获取贵族表情
This commit is contained in:
@@ -119,6 +119,13 @@
|
||||
9B7B606227BB96E40070BB72 /* XPRoomAnchorInfoCardView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B7B606127BB96E40070BB72 /* XPRoomAnchorInfoCardView.m */; };
|
||||
9B7B606627BBA0EE0070BB72 /* XPAnchorAttentSendInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B7B606527BBA0EE0070BB72 /* XPAnchorAttentSendInfo.m */; };
|
||||
9B208A362779B50100F9E54A /* GiftNobleInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B208A352779B50100F9E54A /* GiftNobleInfoModel.m */; };
|
||||
9B208A3B2779C2E400F9E54A /* XPRoomFaceView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B208A392779C2E400F9E54A /* XPRoomFaceView.m */; };
|
||||
9B208A452779C30100F9E54A /* XCGameRoomFaceTitleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B208A3D2779C30100F9E54A /* XCGameRoomFaceTitleCell.m */; };
|
||||
9B208A462779C30100F9E54A /* XCGameRoomFaceCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B208A3E2779C30100F9E54A /* XCGameRoomFaceCell.m */; };
|
||||
9B208A472779C30100F9E54A /* XCGameRoomFaceTitleButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B208A422779C30100F9E54A /* XCGameRoomFaceTitleButton.m */; };
|
||||
9B208A482779C30100F9E54A /* XCGameRoomFaceContainerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B208A442779C30100F9E54A /* XCGameRoomFaceContainerCell.m */; };
|
||||
9B208A4E2779C30600F9E54A /* XCGameRoomFaceTitleDisplayModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B208A4B2779C30600F9E54A /* XCGameRoomFaceTitleDisplayModel.m */; };
|
||||
9B208A4F2779C30600F9E54A /* XCGameRoomFaceViewDisplayModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B208A4D2779C30600F9E54A /* XCGameRoomFaceViewDisplayModel.m */; };
|
||||
9B7D804A2753783D003DAC0C /* SessionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B7D80492753783D003DAC0C /* SessionViewController.m */; };
|
||||
9B7D804D27537950003DAC0C /* MessageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B7D804C27537950003DAC0C /* MessageCell.m */; };
|
||||
9B7D80502753AA9D003DAC0C /* UITableView+NIMScrollToBottom.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B7D804E2753AA9D003DAC0C /* UITableView+NIMScrollToBottom.m */; };
|
||||
@@ -127,6 +134,7 @@
|
||||
9BAA5FF0277A23F4007453F3 /* XPPermissionsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BAA5FEF277A23F4007453F3 /* XPPermissionsViewController.m */; };
|
||||
9BE29A6B27D1BFF700446AB5 /* anchor_room_speak.svga in Resources */ = {isa = PBXBuildFile; fileRef = 9BE29A6927D1BFF700446AB5 /* anchor_room_speak.svga */; };
|
||||
9BE29A6D27D210A500446AB5 /* anchor_room_bg.svga in Resources */ = {isa = PBXBuildFile; fileRef = 9BE29A6C27D210A500446AB5 /* anchor_room_bg.svga */; };
|
||||
9BC5C8E9277AB6AE007C8719 /* XPFacePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC5C8E8277AB6AE007C8719 /* XPFacePresenter.m */; };
|
||||
9BC5C8ED277AFF63007C8719 /* XPNobleCenterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC5C8EC277AFF63007C8719 /* XPNobleCenterViewController.m */; };
|
||||
9BC5C8F6277B0263007C8719 /* XPNobleCenterListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC5C8F5277B0263007C8719 /* XPNobleCenterListViewController.m */; };
|
||||
9BC5C8F9277B02EA007C8719 /* Api+NobleCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC5C8F8277B02EA007C8719 /* Api+NobleCenter.m */; };
|
||||
@@ -690,6 +698,20 @@
|
||||
9B7B606527BBA0EE0070BB72 /* XPAnchorAttentSendInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPAnchorAttentSendInfo.m; sourceTree = "<group>"; };
|
||||
9B208A342779B50100F9E54A /* GiftNobleInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiftNobleInfoModel.h; sourceTree = "<group>"; };
|
||||
9B208A352779B50100F9E54A /* GiftNobleInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiftNobleInfoModel.m; sourceTree = "<group>"; };
|
||||
9B208A392779C2E400F9E54A /* XPRoomFaceView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPRoomFaceView.m; sourceTree = "<group>"; };
|
||||
9B208A3A2779C2E400F9E54A /* XPRoomFaceView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPRoomFaceView.h; sourceTree = "<group>"; };
|
||||
9B208A3D2779C30100F9E54A /* XCGameRoomFaceTitleCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XCGameRoomFaceTitleCell.m; sourceTree = "<group>"; };
|
||||
9B208A3E2779C30100F9E54A /* XCGameRoomFaceCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XCGameRoomFaceCell.m; sourceTree = "<group>"; };
|
||||
9B208A3F2779C30100F9E54A /* XCGameRoomFaceTitleButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XCGameRoomFaceTitleButton.h; sourceTree = "<group>"; };
|
||||
9B208A402779C30100F9E54A /* XCGameRoomFaceContainerCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XCGameRoomFaceContainerCell.h; sourceTree = "<group>"; };
|
||||
9B208A412779C30100F9E54A /* XCGameRoomFaceTitleCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XCGameRoomFaceTitleCell.h; sourceTree = "<group>"; };
|
||||
9B208A422779C30100F9E54A /* XCGameRoomFaceTitleButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XCGameRoomFaceTitleButton.m; sourceTree = "<group>"; };
|
||||
9B208A432779C30100F9E54A /* XCGameRoomFaceCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XCGameRoomFaceCell.h; sourceTree = "<group>"; };
|
||||
9B208A442779C30100F9E54A /* XCGameRoomFaceContainerCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XCGameRoomFaceContainerCell.m; sourceTree = "<group>"; };
|
||||
9B208A4A2779C30600F9E54A /* XCGameRoomFaceViewDisplayModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XCGameRoomFaceViewDisplayModel.h; sourceTree = "<group>"; };
|
||||
9B208A4B2779C30600F9E54A /* XCGameRoomFaceTitleDisplayModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XCGameRoomFaceTitleDisplayModel.m; sourceTree = "<group>"; };
|
||||
9B208A4C2779C30600F9E54A /* XCGameRoomFaceTitleDisplayModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XCGameRoomFaceTitleDisplayModel.h; sourceTree = "<group>"; };
|
||||
9B208A4D2779C30600F9E54A /* XCGameRoomFaceViewDisplayModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XCGameRoomFaceViewDisplayModel.m; sourceTree = "<group>"; };
|
||||
9B7D80482753783D003DAC0C /* SessionViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SessionViewController.h; sourceTree = "<group>"; };
|
||||
9B7D80492753783D003DAC0C /* SessionViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SessionViewController.m; sourceTree = "<group>"; };
|
||||
9B7D804B27537950003DAC0C /* MessageCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageCell.h; sourceTree = "<group>"; };
|
||||
@@ -705,6 +727,8 @@
|
||||
9BB865B4272076140029CDE0 /* RtcImplDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RtcImplDelegate.h; sourceTree = "<group>"; };
|
||||
9BE29A6927D1BFF700446AB5 /* anchor_room_speak.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = anchor_room_speak.svga; sourceTree = "<group>"; };
|
||||
9BE29A6C27D210A500446AB5 /* anchor_room_bg.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = anchor_room_bg.svga; sourceTree = "<group>"; };
|
||||
9BC5C8E7277AB6AE007C8719 /* XPFacePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPFacePresenter.h; sourceTree = "<group>"; };
|
||||
9BC5C8E8277AB6AE007C8719 /* XPFacePresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPFacePresenter.m; sourceTree = "<group>"; };
|
||||
9BC5C8EB277AFF63007C8719 /* XPNobleCenterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNobleCenterViewController.h; sourceTree = "<group>"; };
|
||||
9BC5C8EC277AFF63007C8719 /* XPNobleCenterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNobleCenterViewController.m; sourceTree = "<group>"; };
|
||||
9BC5C8F3277B0144007C8719 /* XPNobleCenterProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNobleCenterProtocol.h; sourceTree = "<group>"; };
|
||||
@@ -2082,6 +2106,52 @@
|
||||
children = (
|
||||
9B7B606427BBA0EE0070BB72 /* XPAnchorAttentSendInfo.h */,
|
||||
9B7B606527BBA0EE0070BB72 /* XPAnchorAttentSendInfo.m */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9B208A372779C1EF00F9E54A /* FaceView */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9BC5C8E6277AAD8B007C8719 /* Presenter */,
|
||||
9B208A492779C30600F9E54A /* Model */,
|
||||
9B208A382779C2CA00F9E54A /* View */,
|
||||
);
|
||||
path = FaceView;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9B208A382779C2CA00F9E54A /* View */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9B208A3C2779C30100F9E54A /* Cell */,
|
||||
9B208A3A2779C2E400F9E54A /* XPRoomFaceView.h */,
|
||||
9B208A392779C2E400F9E54A /* XPRoomFaceView.m */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9B208A3C2779C30100F9E54A /* Cell */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9B208A3D2779C30100F9E54A /* XCGameRoomFaceTitleCell.m */,
|
||||
9B208A3E2779C30100F9E54A /* XCGameRoomFaceCell.m */,
|
||||
9B208A3F2779C30100F9E54A /* XCGameRoomFaceTitleButton.h */,
|
||||
9B208A402779C30100F9E54A /* XCGameRoomFaceContainerCell.h */,
|
||||
9B208A412779C30100F9E54A /* XCGameRoomFaceTitleCell.h */,
|
||||
9B208A422779C30100F9E54A /* XCGameRoomFaceTitleButton.m */,
|
||||
9B208A432779C30100F9E54A /* XCGameRoomFaceCell.h */,
|
||||
9B208A442779C30100F9E54A /* XCGameRoomFaceContainerCell.m */,
|
||||
);
|
||||
path = Cell;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9B208A492779C30600F9E54A /* Model */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9B208A4A2779C30600F9E54A /* XCGameRoomFaceViewDisplayModel.h */,
|
||||
9B208A4D2779C30600F9E54A /* XCGameRoomFaceViewDisplayModel.m */,
|
||||
9B208A4C2779C30600F9E54A /* XCGameRoomFaceTitleDisplayModel.h */,
|
||||
9B208A4B2779C30600F9E54A /* XCGameRoomFaceTitleDisplayModel.m */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
@@ -2102,6 +2172,15 @@
|
||||
path = Session;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9BC5C8E6277AAD8B007C8719 /* Presenter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9BC5C8E7277AB6AE007C8719 /* XPFacePresenter.h */,
|
||||
9BC5C8E8277AB6AE007C8719 /* XPFacePresenter.m */,
|
||||
);
|
||||
path = Presenter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9BC5C8EA277AFEDC007C8719 /* Noble */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -3795,6 +3874,7 @@
|
||||
E8E7DAED27451E4600C631CC /* ModuleKit */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9B208A372779C1EF00F9E54A /* FaceView */,
|
||||
E8788931273A53B000BF1D57 /* SendGiftView */,
|
||||
);
|
||||
path = ModuleKit;
|
||||
@@ -3975,6 +4055,7 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
E8E5E1AF27C3920100F457D8 /* XPHomeRecommendPresenter.m in Sources */,
|
||||
9B208A4F2779C30600F9E54A /* XCGameRoomFaceViewDisplayModel.m in Sources */,
|
||||
181D7F1B2726CE2A00B7C059 /* StageView.m in Sources */,
|
||||
18EE3FF12750D2AD00A452BF /* NIMTimeUtils.m in Sources */,
|
||||
E8ACEFEF27C8C45100F66D1A /* XPHomeHapppyRoomTableViewCell.m in Sources */,
|
||||
@@ -4154,6 +4235,7 @@
|
||||
189DD54B26DE338800AB55B1 /* BaseViewController.m in Sources */,
|
||||
E8B846C226FD82DC00A777FE /* XPMineUserInfoAlbumCollectionViewCell.m in Sources */,
|
||||
E816C11527608A7500C84014 /* XPRoomMiniManager.m in Sources */,
|
||||
9B208A462779C30100F9E54A /* XCGameRoomFaceCell.m in Sources */,
|
||||
E8EEB91726FC7B35007C6EBA /* XPMineUserInfoDesViewController.m in Sources */,
|
||||
E80CBDED27D0D899001E1EC2 /* XPHomeLikeEmptyTableViewCell.m in Sources */,
|
||||
180806FB2729A354001FD836 /* ThemeColor+Room.m in Sources */,
|
||||
@@ -4236,11 +4318,15 @@
|
||||
186A534A26FC6ED900D67B2C /* TTActionSheetConfig.m in Sources */,
|
||||
E81C279326EB394D0031E639 /* LoginForgetPasswordViewController.m in Sources */,
|
||||
E81C278D26EAFAF60031E639 /* DESEncrypt.m in Sources */,
|
||||
9BC5C8E9277AB6AE007C8719 /* XPFacePresenter.m in Sources */,
|
||||
E81366E726F0A49E0076364C /* NSString+Utils.m in Sources */,
|
||||
E87A26F627587C48002DDC7A /* XPHomePartyContainerViewController.m in Sources */,
|
||||
9B208A452779C30100F9E54A /* XCGameRoomFaceTitleCell.m in Sources */,
|
||||
9B208A472779C30100F9E54A /* XCGameRoomFaceTitleButton.m in Sources */,
|
||||
E8EEB90126FC31B6007C6EBA /* XPMineUserInfoPresenter.m in Sources */,
|
||||
18F404BB2760982000A6C548 /* ChatLimitModel.m in Sources */,
|
||||
189DD56526DE465A00AB55B1 /* LoginViewController.m in Sources */,
|
||||
9B208A3B2779C2E400F9E54A /* XPRoomFaceView.m in Sources */,
|
||||
E824544B26F5BBB800BE8163 /* XPMineModifPayPwdViewController.m in Sources */,
|
||||
E81C1B2227705F950020D1E4 /* Api+ArrangeMic.m in Sources */,
|
||||
E8ACEFF527C8EF0500F66D1A /* XPHomeHotRoomViewController.m in Sources */,
|
||||
@@ -4303,6 +4389,7 @@
|
||||
E884C3722743AEDE00E1EBED /* CustomAttachmentDecoder.m in Sources */,
|
||||
18EE3FEE2750CE6D00A452BF /* NIMMessageUtils.m in Sources */,
|
||||
E8DEC9AC2764A6CD0078CB70 /* XPRoomMoreMenuCollectionViewCell.m in Sources */,
|
||||
9B208A482779C30100F9E54A /* XCGameRoomFaceContainerCell.m in Sources */,
|
||||
9B7D804A2753783D003DAC0C /* SessionViewController.m in Sources */,
|
||||
E839533F276A0CDB00CF2F24 /* XPMineNameplateTableViewCell.m in Sources */,
|
||||
E8B846BC26FD7C1200A777FE /* UploadImage.m in Sources */,
|
||||
@@ -4362,6 +4449,7 @@
|
||||
E833ED0D274FAD1C00A2463B /* XPKickUserModel.m in Sources */,
|
||||
E8788934273A53D700BF1D57 /* XPSendGiftView.m in Sources */,
|
||||
E896EF9C2771AE6B00AD2CC1 /* XPMineFansViewController.m in Sources */,
|
||||
9B208A4E2779C30600F9E54A /* XCGameRoomFaceTitleDisplayModel.m in Sources */,
|
||||
E88B5CB826FB325200DA9178 /* XPMineTeenagerPwdPresenter.m in Sources */,
|
||||
E84B0E462727EF9D008818C6 /* XPRoomMessageParser.m in Sources */,
|
||||
E838D9A0275E1BF60079E0B5 /* XPRoomAnimationView.m in Sources */,
|
||||
|
@@ -29,6 +29,7 @@ typedef NS_ENUM(NSUInteger, KeyType) {
|
||||
keyType_YiDunBussinessId,///易盾的id
|
||||
keyType_UMengAppKey,///友盟统计的key
|
||||
keyType_UMengAppChannel,///友盟统计的渠道
|
||||
KeyType_FacePwdEncode, ///表情包解密key
|
||||
};
|
||||
|
||||
/// 获取当前项目中所用到的 type 所对应的 value 的值 type 类型
|
||||
|
@@ -40,6 +40,7 @@ NSString * const KeyWithType(KeyType type) {
|
||||
@(keyType_YiDunBussinessId) : @"244721766ba607056a32c8824a85c253",
|
||||
@(keyType_UMengAppKey) : @"61b065e8e014255fcba606d1",
|
||||
@(keyType_UMengAppChannel) : @"App Store",
|
||||
@(KeyType_FacePwdEncode) : @"1ea53d260ecf11e7b56e00163e046a26",
|
||||
},
|
||||
///测试环境
|
||||
@(NO):@{
|
||||
@@ -56,6 +57,7 @@ NSString * const KeyWithType(KeyType type) {
|
||||
@(keyType_YiDunBussinessId) : @"be58dfa4a664540006f0ed1f752d604a",
|
||||
@(keyType_UMengAppKey) : @"5ff6bc6dadb42d5826a1cbc4",
|
||||
@(keyType_UMengAppChannel) : @"App Store",
|
||||
@(KeyType_FacePwdEncode) : @"1ea53d260ecf11e7b56e00163e046a26",
|
||||
}
|
||||
};
|
||||
NSDictionary * enviroDic = [dic objectForKey:@(isRelase)];
|
||||
|
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// XCGameRoomFaceTitleDisplayModel.h
|
||||
// XCRoomMoudle
|
||||
//
|
||||
// Created by 卫明何 on 2018/8/23.
|
||||
// Copyright © 2018年 卫明何. All rights reserved.
|
||||
//
|
||||
|
||||
//#import "BaseObject.h"
|
||||
|
||||
//facemodel
|
||||
//#import "FaceInfo.h"
|
||||
//core
|
||||
//#import "FaceCore.h"
|
||||
|
||||
|
||||
typedef enum : NSUInteger {
|
||||
RoomFaceTypeNormal,
|
||||
RoomFaceTypeNoble,
|
||||
} RoomFaceType;
|
||||
|
||||
@interface XCGameRoomFaceTitleDisplayModel : NSObject
|
||||
|
||||
/**
|
||||
该标题下的表情类型
|
||||
*/
|
||||
@property (nonatomic,assign) RoomFaceType type;
|
||||
|
||||
/**
|
||||
标题内容
|
||||
*/
|
||||
@property (nonatomic,copy) NSString *title;
|
||||
|
||||
/**
|
||||
是否被选择
|
||||
*/
|
||||
@property (nonatomic,assign) BOOL isSelected;
|
||||
|
||||
@end
|
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// XCGameRoomFaceTitleDisplayModel.m
|
||||
// XCRoomMoudle
|
||||
//
|
||||
// Created by 卫明何 on 2018/8/23.
|
||||
// Copyright © 2018年 卫明何. All rights reserved.
|
||||
//
|
||||
|
||||
#import "XCGameRoomFaceTitleDisplayModel.h"
|
||||
|
||||
@implementation XCGameRoomFaceTitleDisplayModel
|
||||
|
||||
@end
|
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// XCGameRoomFaceViewDisplayModel.h
|
||||
// XCRoomMoudle
|
||||
//
|
||||
// Created by 卫明何 on 2018/8/23.
|
||||
// Copyright © 2018年 卫明何. All rights reserved.
|
||||
//
|
||||
|
||||
//#import "BaseObject.h"
|
||||
|
||||
//submodel
|
||||
#import "XCGameRoomFaceTitleDisplayModel.h"
|
||||
|
||||
typedef enum : NSUInteger {
|
||||
XCGameRoomFaceViewDisplayType_normal = 1, //普通视图,没有圆角
|
||||
XCGameRoomFaceViewDisplayType_Noble = 2, //有贵族表情的视图,需要titles不为空
|
||||
XCGameRoomFaceViewDisplayType_normal_corner = 3 //普通视图,顶部有两个圆角
|
||||
} XCGameRoomFaceViewDisplayType;
|
||||
|
||||
@interface XCGameRoomFaceViewDisplayModel : NSObject
|
||||
|
||||
/**
|
||||
标题模型数组
|
||||
*/
|
||||
@property (strong, nonatomic) NSMutableArray<XCGameRoomFaceTitleDisplayModel *> *titles;
|
||||
|
||||
/**
|
||||
显示布局类型
|
||||
*/
|
||||
@property (nonatomic,assign) XCGameRoomFaceViewDisplayType displayType;
|
||||
|
||||
@end
|
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// XCGameRoomFaceViewDisplayModel.m
|
||||
// XCRoomMoudle
|
||||
//
|
||||
// Created by 卫明何 on 2018/8/23.
|
||||
// Copyright © 2018年 卫明何. All rights reserved.
|
||||
//
|
||||
|
||||
#import "XCGameRoomFaceViewDisplayModel.h"
|
||||
|
||||
@implementation XCGameRoomFaceViewDisplayModel
|
||||
|
||||
@end
|
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPFacePresenter.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2021/12/28.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPFacePresenter : NSObject
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// XPFacePresenter.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2021/12/28.
|
||||
//
|
||||
|
||||
#import "XPFacePresenter.h"
|
||||
|
||||
@implementation XPFacePresenter
|
||||
|
||||
@end
|
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// XCGameRoomFaceCell.h
|
||||
// XChat
|
||||
//
|
||||
// Created by 卫明何 on 2017/9/29.
|
||||
// Copyright © 2017年 XC. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface XCGameRoomFaceCell : UICollectionViewCell
|
||||
|
||||
/**
|
||||
表情图标
|
||||
*/
|
||||
@property (strong, nonatomic) UIImageView *faceImageView;
|
||||
|
||||
/**
|
||||
表情名
|
||||
*/
|
||||
@property (strong, nonatomic) UILabel *faceName;
|
||||
|
||||
/**
|
||||
贵族标识 tag
|
||||
*/
|
||||
@property (strong, nonatomic) UIImageView *nobleTagImageView;
|
||||
|
||||
@end
|
@@ -0,0 +1,79 @@
|
||||
//
|
||||
// XCGameRoomFaceCell.m
|
||||
// XChat
|
||||
//
|
||||
// Created by 卫明何 on 2017/9/29.
|
||||
// Copyright © 2017年 XC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "XCGameRoomFaceCell.h"
|
||||
#import <Masonry/Masonry.h>
|
||||
|
||||
//3rd part
|
||||
|
||||
|
||||
//theme
|
||||
|
||||
|
||||
@implementation XCGameRoomFaceCell
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
[self initView];
|
||||
[self initConstrations];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)initView {
|
||||
[self.contentView addSubview:self.faceImageView];
|
||||
[self.contentView addSubview:self.faceName];
|
||||
[self.contentView addSubview:self.nobleTagImageView];
|
||||
}
|
||||
|
||||
- (void)initConstrations {
|
||||
[self.faceImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.contentView.mas_top);
|
||||
make.width.height.mas_equalTo(36);
|
||||
make.centerX.mas_equalTo(self.contentView.mas_centerX);
|
||||
}];
|
||||
[self.nobleTagImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.faceImageView.mas_top);
|
||||
make.trailing.mas_equalTo(self.faceImageView.mas_trailing).offset(20);
|
||||
make.width.mas_equalTo(27.5);
|
||||
make.height.mas_equalTo(14);
|
||||
}];
|
||||
[self.faceName mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.faceImageView.mas_bottom);
|
||||
make.centerX.mas_equalTo(self.faceImageView.mas_centerX);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - setter & getter
|
||||
|
||||
- (UIImageView *)faceImageView {
|
||||
if (!_faceImageView) {
|
||||
_faceImageView = [[UIImageView alloc]init];
|
||||
}
|
||||
return _faceImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)faceName {
|
||||
if (!_faceName) {
|
||||
_faceName = [[UILabel alloc]init];
|
||||
_faceName.font = [UIFont systemFontOfSize:12.f];
|
||||
// _faceName.textColor = UIColorFromRGB(0xd6d6d6);
|
||||
_faceName.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _faceName;
|
||||
}
|
||||
|
||||
- (UIImageView *)nobleTagImageView {
|
||||
if (!_nobleTagImageView) {
|
||||
_nobleTagImageView = [[UIImageView alloc]init];
|
||||
}
|
||||
return _nobleTagImageView;
|
||||
}
|
||||
|
||||
|
||||
@end
|
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// XCGameRoomFaceContainerCell.h
|
||||
// XChat
|
||||
//
|
||||
// Created by 卫明何 on 2017/12/12.
|
||||
// Copyright © 2017年 XC. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@class FaceConfigInfo;
|
||||
|
||||
@interface XCGameRoomFaceContainerCell : UICollectionViewCell
|
||||
|
||||
/**
|
||||
单页collectionview
|
||||
*/
|
||||
@property (strong, nonatomic) UICollectionView *collectionView;
|
||||
|
||||
/**
|
||||
单页表情数据
|
||||
*/
|
||||
@property (strong, nonatomic) NSMutableArray<FaceConfigInfo *> *faceInfos;
|
||||
|
||||
@end
|
@@ -0,0 +1,156 @@
|
||||
//
|
||||
// XCGameRoomFaceContainerCell.m
|
||||
// XChat
|
||||
//
|
||||
// Created by 卫明何 on 2017/12/12.
|
||||
// Copyright © 2017年 XC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "XCGameRoomFaceContainerCell.h"
|
||||
#import "XCGameRoomFaceCell.h"
|
||||
#import <Masonry/Masonry.h>
|
||||
//#import "FaceConfigInfo.h"
|
||||
|
||||
//core
|
||||
//#import "FaceCore.h"
|
||||
//#import "AuthCore.h"
|
||||
//#import "UserCore.h"
|
||||
|
||||
//client
|
||||
//#import "RoomQueueCoreClient.h"
|
||||
|
||||
//m
|
||||
//#import "UserInfo.h"
|
||||
|
||||
//tool
|
||||
//#import "XCAlertControllerCenter.h"
|
||||
|
||||
|
||||
@interface XCGameRoomFaceContainerCell()
|
||||
<UICollectionViewDelegate,
|
||||
UICollectionViewDataSource,
|
||||
UICollectionViewDelegateFlowLayout
|
||||
>
|
||||
|
||||
//@property (nonatomic, strong) UserInfo *userInfo;
|
||||
@property (nonatomic, strong) NSIndexPath *currentIndexPath;
|
||||
@end
|
||||
|
||||
@implementation XCGameRoomFaceContainerCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
}
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
[self initView];
|
||||
[self initConstrations];
|
||||
[self addCore];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)initView {
|
||||
// [[GetCore(UserCore) getUserInfoByRac:GetCore(AuthCore).getUid.userIDValue refresh:NO] subscribeNext:^(id x) {
|
||||
// self.userInfo = (UserInfo *)x;
|
||||
// }];
|
||||
[self.collectionView registerClass:[XCGameRoomFaceCell class] forCellWithReuseIdentifier:@"XCGameRoomFaceCell"];
|
||||
[self.contentView addSubview:self.collectionView];
|
||||
}
|
||||
|
||||
- (void)initConstrations {
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.contentView.mas_top);
|
||||
make.leading.mas_equalTo(self.contentView.mas_leading);
|
||||
make.trailing.mas_equalTo(self.contentView.mas_trailing);
|
||||
make.bottom.mas_equalTo(self.contentView.mas_bottom);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)addCore {
|
||||
// AddCoreClient(RoomQueueCoreClient, self);
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
// RemoveCoreClientAll(self);
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDelegate
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
self.currentIndexPath = indexPath;
|
||||
// FaceConfigInfo *info = [self.faceInfos safeObjectAtIndex:indexPath.row];
|
||||
//
|
||||
// if (![GetCore(FaceCore) getShowingFace]) {
|
||||
// [GetCore(FaceCore) sendFace:info];
|
||||
// [[XCAlertControllerCenter defaultCenter]dismissAlertNeedBlock:NO];
|
||||
// }
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDataSource
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
return self.faceInfos.count;
|
||||
}
|
||||
|
||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
XCGameRoomFaceCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"XCGameRoomFaceCell" forIndexPath:indexPath];
|
||||
[self configureCell:cell forItemAtIndexPath:indexPath];
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)configureCell:(XCGameRoomFaceCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
FaceConfigInfo *info = self.faceInfos[indexPath.row];
|
||||
//读取图片
|
||||
// UIImage *face = [GetCore(FaceCore) findFaceIconImageById:info.id];
|
||||
// [cell.faceImageView setImage:face];
|
||||
// [cell.faceName setText:info.name];
|
||||
|
||||
cell.nobleTagImageView.hidden = YES;
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDelegateFlowLayout
|
||||
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return CGSizeMake((self.frame.size.width - 20) / 5, self.frame.size.height / 3);
|
||||
}
|
||||
|
||||
- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section {
|
||||
return 0.01;
|
||||
}
|
||||
|
||||
- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section {
|
||||
return 0.01;
|
||||
}
|
||||
|
||||
- (void)setFaceInfos:(NSMutableArray<FaceConfigInfo *> *)faceInfos{
|
||||
_faceInfos = faceInfos;
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - RoomQueueCoreClient
|
||||
- (void)onMicroQueueUpdate:(NSMutableDictionary *)micQueue{
|
||||
// [[GetCore(UserCore) getUserInfoByRac:GetCore(AuthCore).getUid.userIDValue refresh:NO] subscribeNext:^(id x) {
|
||||
// self.userInfo = (UserInfo *)x;
|
||||
// }];
|
||||
}
|
||||
|
||||
#pragma mark - Getter & Setter
|
||||
|
||||
- (UICollectionView *)collectionView {
|
||||
if (!_collectionView) {
|
||||
UICollectionViewFlowLayout *flow = [[UICollectionViewFlowLayout alloc]init];
|
||||
flow.scrollDirection = UICollectionViewScrollDirectionVertical;
|
||||
_collectionView = [[UICollectionView alloc]initWithFrame:CGRectZero collectionViewLayout:flow];
|
||||
_collectionView.scrollEnabled = NO;
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.dataSource = self;
|
||||
_collectionView.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
return _collectionView;
|
||||
}
|
||||
|
||||
|
||||
@end
|
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// XCGameRoomFaceTitleButton.h
|
||||
// AFNetworking
|
||||
//
|
||||
// Created by lvjunhang on 2018/11/27.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XCGameRoomFaceTitleButton : UIButton
|
||||
/**
|
||||
标题
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *title;
|
||||
/**
|
||||
默认标题颜色,默认:[UIColor colorWithWhite:1 alpha:0.4]
|
||||
*/
|
||||
@property (nonatomic, strong) UIColor *normalTitleColor;
|
||||
/**
|
||||
选中标题颜色,默认:[UIColor colorWithWhite:1 alpha:1]
|
||||
*/
|
||||
@property (nonatomic, strong) UIColor *selectTitleColor;
|
||||
/**
|
||||
下划线颜色,默认:[UIColor colorWithWhite:1 alpha:0.4]
|
||||
*/
|
||||
@property (nonatomic, strong) UIColor *underlineColor;
|
||||
|
||||
/**
|
||||
是否显示下划线,默认:NO
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL isShowUnderline;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,100 @@
|
||||
//
|
||||
// XCGameRoomFaceTitleButton.m
|
||||
// AFNetworking
|
||||
//
|
||||
// Created by lvjunhang on 2018/11/27.
|
||||
//
|
||||
|
||||
#import "XCGameRoomFaceTitleButton.h"
|
||||
#import <Masonry/Masonry.h>
|
||||
|
||||
|
||||
|
||||
|
||||
@interface XCGameRoomFaceTitleButton ()
|
||||
@property (nonatomic, strong) UILabel *nameLabel;
|
||||
@property (nonatomic, strong) UIView *underlineView;
|
||||
@end
|
||||
|
||||
@implementation XCGameRoomFaceTitleButton
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
self.userInteractionEnabled = NO;
|
||||
|
||||
[self addSubview:self.nameLabel];
|
||||
[self addSubview:self.underlineView];
|
||||
|
||||
[self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(0);
|
||||
make.left.right.mas_equalTo(0);
|
||||
}];
|
||||
|
||||
[self.underlineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.nameLabel.mas_bottom).offset(2);
|
||||
make.centerX.mas_equalTo(0);
|
||||
make.width.mas_equalTo(9);
|
||||
make.height.mas_equalTo(2);
|
||||
}];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Override
|
||||
- (void)setSelected:(BOOL)selected {
|
||||
[super setSelected:selected];
|
||||
|
||||
self.nameLabel.textColor = selected ? self.selectTitleColor : self.normalTitleColor;
|
||||
self.underlineView.hidden = !self.isShowUnderline || !selected;
|
||||
}
|
||||
|
||||
- (void)setTitle:(NSString *)title {
|
||||
_title = title;
|
||||
|
||||
NSAssert(title, @"title can not be nil");
|
||||
self.nameLabel.text = title;
|
||||
}
|
||||
|
||||
#pragma mark - Getter Setter
|
||||
- (UILabel *)nameLabel {
|
||||
if (_nameLabel == nil) {
|
||||
_nameLabel = [[UILabel alloc] init];
|
||||
_nameLabel.textColor = self.normalTitleColor;
|
||||
_nameLabel.font = [UIFont systemFontOfSize:14];
|
||||
_nameLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _nameLabel;
|
||||
}
|
||||
|
||||
- (UIView *)underlineView {
|
||||
if (_underlineView == nil) {
|
||||
_underlineView = [[UIView alloc] init];
|
||||
_underlineView.backgroundColor = self.underlineColor;
|
||||
_underlineView.layer.cornerRadius = 2;
|
||||
}
|
||||
return _underlineView;
|
||||
}
|
||||
|
||||
- (UIColor *)normalTitleColor {
|
||||
if (_normalTitleColor == nil) {
|
||||
_normalTitleColor = [UIColor colorWithWhite:1 alpha:0.4];
|
||||
}
|
||||
return _normalTitleColor;
|
||||
}
|
||||
|
||||
- (UIColor *)selectTitleColor {
|
||||
if (_selectTitleColor == nil) {
|
||||
_selectTitleColor = [UIColor colorWithWhite:1 alpha:1];
|
||||
}
|
||||
return _selectTitleColor;
|
||||
}
|
||||
|
||||
- (UIColor *)underlineColor {
|
||||
if (_underlineColor == nil) {
|
||||
// _underlineColor = [XCTheme getMainDefaultColor];
|
||||
}
|
||||
return _underlineColor;
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// XCGameRoomFaceTitleCell.h
|
||||
// XCRoomMoudle
|
||||
//
|
||||
// Created by 卫明何 on 2018/8/23.
|
||||
// Copyright © 2018年 卫明何. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "XCGameRoomFaceTitleDisplayModel.h"
|
||||
|
||||
@interface XCGameRoomFaceTitleCell : UICollectionViewCell
|
||||
|
||||
/**
|
||||
展示UI模型
|
||||
*/
|
||||
@property (strong, nonatomic) XCGameRoomFaceTitleDisplayModel *displayModel;
|
||||
|
||||
@end
|
@@ -0,0 +1,79 @@
|
||||
//
|
||||
// XCGameRoomFaceTitleCell.m
|
||||
// XCRoomMoudle
|
||||
//
|
||||
// Created by 卫明何 on 2018/8/23.
|
||||
// Copyright © 2018年 卫明何. All rights reserved.
|
||||
//
|
||||
|
||||
#import "XCGameRoomFaceTitleCell.h"
|
||||
#import "XCGameRoomFaceTitleButton.h"
|
||||
#import <Masonry/Masonry.h>
|
||||
|
||||
|
||||
|
||||
//3rd part
|
||||
|
||||
|
||||
@interface XCGameRoomFaceTitleCell ()
|
||||
|
||||
@property (strong, nonatomic) XCGameRoomFaceTitleButton *titleButton;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XCGameRoomFaceTitleCell
|
||||
|
||||
#pragma mark - life cycle
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
[self initView];
|
||||
[self initConstrations];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - public methods
|
||||
|
||||
#pragma mark - [系统控件的Protocol] //注意要把名字改掉,这个MARK只做功能划分,不是一个真正的MARK,每个不一样的Protocol,需要一个新的MARK”
|
||||
|
||||
#pragma mark - [自定义控件的Protocol] //注意要把名字改掉,这个MARK只做功能划分,不是一个真正的MARK,每个不一样的Protocol,需要一个新的MARK”
|
||||
|
||||
#pragma mark - [core相关的Protocol] //注意要把名字改掉,这个MARK只做功能划分,不是一个真正的MARK,每个不一样的Protocol,需要一个新的MARK”
|
||||
|
||||
#pragma mark - event response
|
||||
|
||||
#pragma mark - private method
|
||||
|
||||
- (void)initView {
|
||||
[self.contentView addSubview:self.titleButton];
|
||||
}
|
||||
|
||||
- (void)initConstrations {
|
||||
|
||||
[self.titleButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(UIEdgeInsetsZero);
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
- (void)setDisplayModel:(XCGameRoomFaceTitleDisplayModel *)displayModel {
|
||||
_displayModel = displayModel;
|
||||
NSAssert(displayModel.title.length > 0, @"XCGameRoomFaceTitleDisplayModel 's protype name title can'not be nil");
|
||||
|
||||
self.titleButton.title = displayModel.title;
|
||||
self.titleButton.selected = displayModel.isSelected;
|
||||
}
|
||||
|
||||
#pragma mark - getters and setters
|
||||
|
||||
- (XCGameRoomFaceTitleButton *)titleButton {
|
||||
if (!_titleButton) {
|
||||
_titleButton = [XCGameRoomFaceTitleButton buttonWithType:UIButtonTypeCustom];
|
||||
_titleButton.isShowUnderline = YES;
|
||||
|
||||
}
|
||||
return _titleButton;
|
||||
}
|
||||
|
||||
@end
|
40
xplan-ios/Main/ModuleKit/FaceView/View/XPRoomFaceView.h
Normal file
40
xplan-ios/Main/ModuleKit/FaceView/View/XPRoomFaceView.h
Normal file
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// XCGameRoomFaceView.h
|
||||
// XChat
|
||||
//
|
||||
// Created by 卫明何 on 2017/9/29.
|
||||
// Copyright © 2017年 XC. All rights reserved.
|
||||
//
|
||||
// 发送表情view
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "RoomHostDelegate.h"
|
||||
|
||||
//displaymodel
|
||||
#import "XCGameRoomFaceViewDisplayModel.h"
|
||||
|
||||
|
||||
|
||||
@interface XPRoomFaceView : UIView
|
||||
|
||||
///房间内才需要
|
||||
@property (nonatomic,weak) id<RoomHostDelegate> delegate;
|
||||
|
||||
/**
|
||||
分组的表情数组
|
||||
*/
|
||||
@property (strong, nonatomic) NSMutableArray<NSMutableArray *> *faceInfos;
|
||||
|
||||
/**
|
||||
表情collection
|
||||
*/
|
||||
@property (strong, nonatomic) UICollectionView *faceCollectionView;
|
||||
|
||||
/**
|
||||
初始化方法,必须调用这个
|
||||
@param uid 房主uid
|
||||
@return self
|
||||
*/
|
||||
- (instancetype)initWithRoomUid:(NSString *)uid;
|
||||
|
||||
@end
|
453
xplan-ios/Main/ModuleKit/FaceView/View/XPRoomFaceView.m
Normal file
453
xplan-ios/Main/ModuleKit/FaceView/View/XPRoomFaceView.m
Normal file
@@ -0,0 +1,453 @@
|
||||
//
|
||||
// XCGameRoomFaceView.m
|
||||
// XChat
|
||||
//
|
||||
// Created by 卫明何 on 2017/9/29.
|
||||
// Copyright © 2017年 XC. All rights reserved.
|
||||
//
|
||||
|
||||
#import "XPRoomFaceView.h"
|
||||
//view
|
||||
#import "XCGameRoomFaceCell.h"
|
||||
#import "XCGameRoomFaceContainerCell.h"
|
||||
#import "XCGameRoomFaceTitleCell.h"
|
||||
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import "NSArray+Lookin.h"
|
||||
///tool
|
||||
#import "XPMacro.h"
|
||||
|
||||
//core
|
||||
//#import "FaceCore.h"
|
||||
//#import "VersionCore.h"
|
||||
|
||||
//client
|
||||
//#import "FaceSourceClient.h"
|
||||
|
||||
//model
|
||||
//#import "FaceInfo.h"
|
||||
//#import "FaceConfigInfo.h"
|
||||
//#import "AuthCore.h"
|
||||
//#import "UserCore.h"
|
||||
//#import "UserInfo.h"
|
||||
|
||||
//tool
|
||||
|
||||
|
||||
|
||||
//3rd
|
||||
|
||||
|
||||
//theme
|
||||
|
||||
|
||||
//displayModel
|
||||
#import "XCGameRoomFaceViewDisplayModel.h"
|
||||
|
||||
|
||||
@interface XPRoomFaceView()
|
||||
<
|
||||
UICollectionViewDelegate,
|
||||
UICollectionViewDataSource,
|
||||
UICollectionViewDelegateFlowLayout,
|
||||
UIScrollViewDelegate
|
||||
>
|
||||
|
||||
/**
|
||||
显示用模型
|
||||
*/
|
||||
@property (strong, nonatomic) XCGameRoomFaceViewDisplayModel *displayModel;
|
||||
|
||||
/**
|
||||
翻页控件
|
||||
*/
|
||||
@property (strong, nonatomic) UIPageControl *pageControl;
|
||||
|
||||
/**
|
||||
标题collection
|
||||
*/
|
||||
@property (strong, nonatomic) UICollectionView *titlesCollectionView;
|
||||
|
||||
/**
|
||||
高斯模糊view
|
||||
*/
|
||||
@property (strong, nonatomic) UIVisualEffectView *effectView;
|
||||
|
||||
/**
|
||||
如果displayType为展示Noble 这个view就会显示出来
|
||||
*/
|
||||
@property (strong, nonatomic) UIView *tabBarView;
|
||||
|
||||
/**
|
||||
选中的表情类型
|
||||
*/
|
||||
@property (nonatomic,assign) RoomFaceType selectedFaceType;
|
||||
|
||||
/**
|
||||
选中的indexpath
|
||||
*/
|
||||
@property (strong, nonatomic) NSIndexPath *selectedIndexPath;
|
||||
|
||||
/**
|
||||
当前用户信息
|
||||
*/
|
||||
//@property (nonatomic, strong) UserInfo *userInfo;
|
||||
///房主的uid
|
||||
@property (nonatomic,copy) NSString *roomUid;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPRoomFaceView
|
||||
|
||||
- (instancetype)initWithRoomUid:(NSString *)uid {
|
||||
if (self = [super init]) {
|
||||
[self configDisplayModel];
|
||||
|
||||
self.roomUid = uid;
|
||||
[self initView];
|
||||
// [self addCore];
|
||||
[self initConstrations];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
// RemoveCoreClientAll(self);
|
||||
}
|
||||
|
||||
- (void)configDisplayModel {
|
||||
XCGameRoomFaceViewDisplayModel *faceDisplayModel = [[XCGameRoomFaceViewDisplayModel alloc] init];
|
||||
faceDisplayModel.displayType = XCGameRoomFaceViewDisplayType_Noble;
|
||||
faceDisplayModel.titles = [self getTitles];
|
||||
self.displayModel = faceDisplayModel;
|
||||
}
|
||||
|
||||
- (NSMutableArray *)getTitles{
|
||||
XCGameRoomFaceTitleDisplayModel *normalTitle = [[XCGameRoomFaceTitleDisplayModel alloc] init];
|
||||
normalTitle.type = RoomFaceTypeNormal;
|
||||
normalTitle.title = @"表情";
|
||||
normalTitle.isSelected = YES;
|
||||
XCGameRoomFaceTitleDisplayModel *nobleTitle = [[XCGameRoomFaceTitleDisplayModel alloc] init];
|
||||
nobleTitle.type = RoomFaceTypeNoble;
|
||||
nobleTitle.title = @"贵族表情";
|
||||
nobleTitle.isSelected = NO;
|
||||
return @[normalTitle, nobleTitle].mutableCopy;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - UICollectionViewDataSource
|
||||
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
|
||||
if (collectionView == self.titlesCollectionView) {
|
||||
return 1;
|
||||
}else if (collectionView == self.faceCollectionView) {
|
||||
return self.faceInfos.count;
|
||||
}else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
|
||||
if (collectionView == self.titlesCollectionView) {
|
||||
return self.displayModel.titles.count;
|
||||
}else if (collectionView == self.faceCollectionView) {
|
||||
return 1;
|
||||
}else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView
|
||||
cellForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
UICollectionViewCell *cell = nil;
|
||||
if (collectionView == self.titlesCollectionView) {
|
||||
cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"XCGameRoomFaceTitleCell" forIndexPath:indexPath];
|
||||
}else if (collectionView == self.faceCollectionView){
|
||||
cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"XCGameRoomFaceContainerCell" forIndexPath:indexPath];
|
||||
}
|
||||
|
||||
|
||||
[self configureCell:cell forItemAtIndexPath:indexPath];
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)configureCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if ([cell isKindOfClass:[XCGameRoomFaceTitleCell class]]) {
|
||||
XCGameRoomFaceTitleDisplayModel *displayModel = [self.displayModel.titles lookin_safeObjectAtIndex:indexPath.row];
|
||||
if (indexPath == self.selectedIndexPath) {
|
||||
displayModel.isSelected = YES;
|
||||
}else {
|
||||
displayModel.isSelected = NO;
|
||||
}
|
||||
((XCGameRoomFaceTitleCell *)cell).displayModel = [self.displayModel.titles lookin_safeObjectAtIndex:indexPath.row];
|
||||
}else if ([cell isKindOfClass:[XCGameRoomFaceContainerCell class]]) {
|
||||
((XCGameRoomFaceContainerCell *)cell).faceInfos = [self.faceInfos lookin_safeObjectAtIndex:indexPath.section];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDelegate
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (collectionView == self.faceCollectionView) {
|
||||
return CGSizeMake([UIScreen mainScreen].bounds.size.width, 190);
|
||||
}else if (collectionView == self.titlesCollectionView) {
|
||||
return CGSizeMake(70, 40);
|
||||
|
||||
}else {
|
||||
return CGSizeZero;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (collectionView == self.titlesCollectionView) {
|
||||
XCGameRoomFaceTitleDisplayModel *displayModel = [self.displayModel.titles lookin_safeObjectAtIndex:indexPath.row];
|
||||
if (self.selectedIndexPath != indexPath) {
|
||||
self.selectedIndexPath = indexPath;
|
||||
self.selectedFaceType = displayModel.type;
|
||||
[self.titlesCollectionView reloadData];
|
||||
|
||||
[self loadFace];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - UIScrollViewDelegate
|
||||
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
|
||||
CGFloat doublePage = scrollView.contentOffset.x / scrollView.bounds.size.width;
|
||||
int intPage = (int)(doublePage + 0.5);
|
||||
self.pageControl.currentPage = intPage;
|
||||
}
|
||||
|
||||
#pragma mark - FaceSourceClient
|
||||
|
||||
- (void)loadFaceSourceSuccess {
|
||||
[self loadFace];
|
||||
}
|
||||
|
||||
#pragma mark - Event
|
||||
|
||||
|
||||
#pragma mark - private method
|
||||
|
||||
- (void)initView {
|
||||
|
||||
NSAssert(self.displayModel, @"displayMode can not be nil");
|
||||
|
||||
[self addSubview:self.effectView];
|
||||
if (self.displayModel.displayType == XCGameRoomFaceViewDisplayType_Noble) {
|
||||
[self addSubview:self.tabBarView];
|
||||
[self.tabBarView addSubview:self.titlesCollectionView];
|
||||
self.selectedFaceType = RoomFaceTypeNormal;
|
||||
self.selectedIndexPath = [NSIndexPath indexPathForRow:0 inSection:0];
|
||||
}
|
||||
|
||||
[self addSubview:self.faceCollectionView];
|
||||
[self addSubview:self.pageControl];
|
||||
|
||||
[self.titlesCollectionView registerClass:[XCGameRoomFaceTitleCell class] forCellWithReuseIdentifier:@"XCGameRoomFaceTitleCell"];
|
||||
[self.faceCollectionView registerClass:[XCGameRoomFaceCell class] forCellWithReuseIdentifier:@"XCGameRoomFaceCell"];
|
||||
[self.faceCollectionView registerClass:[XCGameRoomFaceContainerCell class] forCellWithReuseIdentifier:@"XCGameRoomFaceContainerCell"];
|
||||
|
||||
// if (GetCore(FaceCore).isLoadFace) {
|
||||
// [self loadFace];
|
||||
// }else {
|
||||
// [UIView showToastInKeyWindow:@"表情准备中" duration:3.0 position:(YYToastPosition)YYToastPositionBottomWithRecordButton];
|
||||
// }
|
||||
}
|
||||
|
||||
- (void)initConstrations {
|
||||
[self.effectView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(self.mas_leading);
|
||||
make.trailing.mas_equalTo(self.mas_trailing);
|
||||
make.top.mas_equalTo(self.mas_top);
|
||||
make.bottom.mas_equalTo(self.mas_bottom);
|
||||
}];
|
||||
if (self.displayModel.displayType == XCGameRoomFaceViewDisplayType_Noble) {
|
||||
[self.tabBarView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(self.mas_leading);
|
||||
make.trailing.mas_equalTo(self.mas_trailing);
|
||||
make.top.mas_equalTo(self.mas_top);
|
||||
make.height.mas_equalTo(40);
|
||||
}];
|
||||
[self.titlesCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(self.tabBarView.mas_leading);
|
||||
make.trailing.mas_equalTo(self.tabBarView.mas_trailing);
|
||||
make.top.mas_equalTo(self.tabBarView.mas_top);
|
||||
make.bottom.mas_equalTo(self.tabBarView.mas_bottom);
|
||||
}];
|
||||
[self.faceCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(self.mas_leading);
|
||||
make.trailing.mas_equalTo(self.mas_trailing);
|
||||
make.top.mas_equalTo(self.tabBarView.mas_bottom);
|
||||
make.bottom.mas_equalTo(self.pageControl.mas_top);
|
||||
}];
|
||||
[self.pageControl mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(self.mas_leading);
|
||||
make.trailing.mas_equalTo(self.mas_trailing);
|
||||
make.height.mas_equalTo(40);
|
||||
make.bottom.mas_equalTo(self.mas_bottom);
|
||||
}];
|
||||
}else {
|
||||
[self.faceCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(self.mas_leading);
|
||||
make.trailing.mas_equalTo(self.mas_trailing);
|
||||
make.top.mas_equalTo(self.mas_top).offset(15);
|
||||
make.bottom.mas_equalTo(self.pageControl.mas_top);
|
||||
}];
|
||||
[self.pageControl mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(self.mas_leading);
|
||||
make.trailing.mas_equalTo(self.mas_trailing);
|
||||
make.height.mas_equalTo(40);
|
||||
make.bottom.mas_equalTo(self.mas_bottom);
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
//- (void)addCore{
|
||||
// AddCoreClient(FaceSourceClient, self);
|
||||
//}
|
||||
|
||||
- (void)loadFace {
|
||||
|
||||
if (self.selectedFaceType == RoomFaceTypeNoble) {
|
||||
|
||||
//如果没有贵族,默认只显示男爵表情,因为没有枚举,这里 hard code =1
|
||||
__block NSUInteger nobleLevel = 1;
|
||||
|
||||
// if (self.userInfo == nil) {
|
||||
// [[GetCore(UserCore) getUserInfoByRac:GetCore(AuthCore).getUid.userIDValue refresh:NO] subscribeNext:^(id x) {
|
||||
// if ([x isKindOfClass:UserInfo.class]) {
|
||||
// self.userInfo = x;
|
||||
// }
|
||||
//
|
||||
// self.faceInfos = [[self nobleFaceFilterByNobleLevel:nobleLevel] mutableCopy];
|
||||
// self.pageControl.hidden = NO;
|
||||
// self.pageControl.numberOfPages = self.faceInfos.count;
|
||||
// [self.faceCollectionView reloadData];
|
||||
// }];
|
||||
//
|
||||
// return;
|
||||
// }
|
||||
|
||||
self.faceInfos = [[self nobleFaceFilterByNobleLevel:nobleLevel] mutableCopy];
|
||||
|
||||
}else{
|
||||
// self.faceInfos = [GetCore(FaceCore) getFaceInfosType:RoomFaceTypeNormal];
|
||||
}
|
||||
|
||||
self.pageControl.hidden = NO;
|
||||
self.pageControl.numberOfPages = self.faceInfos.count;
|
||||
[self.faceCollectionView reloadData];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
根据贵族等级筛选贵族表情,只获取不大于当前等级的表情
|
||||
|
||||
@param level 当前用户贵族等级
|
||||
@discussion 如果没有贵族等级,则默认获取最低贵族男爵的表情,这里 hard code =1
|
||||
@return 贵族表情列表
|
||||
*/
|
||||
- (NSArray<FaceConfigInfo *> *)nobleFaceFilterByNobleLevel:(NSUInteger)level {
|
||||
// NSArray *faces = [[[GetCore(FaceCore) getFaceInfosType:RoomFaceTypeNoble] copy] firstObject];
|
||||
// if (faces.count == 0) {
|
||||
// return @[];
|
||||
// }
|
||||
//
|
||||
// //默认获取最低贵族男爵
|
||||
// if (level < 1) {
|
||||
// level = 1;
|
||||
// }
|
||||
//
|
||||
// NSMutableArray *mArray = [NSMutableArray array];
|
||||
// for (FaceConfigInfo *face in faces) {
|
||||
// if (face.nobleId <= level) {
|
||||
// [mArray addObject:face];
|
||||
// }
|
||||
// }
|
||||
|
||||
NSArray *conbineArray = @[];
|
||||
// if (mArray.count > 0) {
|
||||
// conbineArray = @[[mArray copy]];
|
||||
// }
|
||||
return conbineArray;
|
||||
}
|
||||
|
||||
#pragma mark - Getter & Setter
|
||||
|
||||
- (UICollectionView *)titlesCollectionView {
|
||||
if (!_titlesCollectionView) {
|
||||
UICollectionViewFlowLayout *flow = [[UICollectionViewFlowLayout alloc]init];
|
||||
flow.scrollDirection = UICollectionViewScrollDirectionHorizontal;
|
||||
|
||||
flow.sectionInset = UIEdgeInsetsMake(0, 10, 0, 0);
|
||||
|
||||
_titlesCollectionView = [[UICollectionView alloc]initWithFrame:CGRectZero collectionViewLayout:flow];
|
||||
_titlesCollectionView.delegate = self;
|
||||
_titlesCollectionView.dataSource = self;
|
||||
_titlesCollectionView.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
return _titlesCollectionView;
|
||||
}
|
||||
|
||||
- (UICollectionView *)faceCollectionView {
|
||||
if (!_faceCollectionView) {
|
||||
UICollectionViewFlowLayout *flow = [[UICollectionViewFlowLayout alloc]init];
|
||||
flow.scrollDirection = UICollectionViewScrollDirectionHorizontal;
|
||||
_faceCollectionView = [[UICollectionView alloc]initWithFrame:CGRectZero collectionViewLayout:flow];
|
||||
_faceCollectionView.delegate = self;
|
||||
_faceCollectionView.dataSource = self;
|
||||
_faceCollectionView.pagingEnabled = YES;
|
||||
_faceCollectionView.backgroundColor = [UIColor clearColor];
|
||||
_faceCollectionView.showsVerticalScrollIndicator = NO;
|
||||
_faceCollectionView.showsHorizontalScrollIndicator = NO;
|
||||
}
|
||||
return _faceCollectionView;
|
||||
}
|
||||
|
||||
- (UIVisualEffectView *)effectView {
|
||||
if (!_effectView) {
|
||||
UIBlurEffect *effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark];
|
||||
_effectView = [[UIVisualEffectView alloc]initWithEffect:effect];
|
||||
_effectView.alpha = 1;
|
||||
}
|
||||
return _effectView;
|
||||
}
|
||||
|
||||
- (UIPageControl *)pageControl {
|
||||
if (!_pageControl) {
|
||||
_pageControl = [[UIPageControl alloc]init];
|
||||
_pageControl.userInteractionEnabled = NO;
|
||||
}
|
||||
return _pageControl;
|
||||
}
|
||||
|
||||
- (UIView *)tabBarView {
|
||||
if (!_tabBarView) {
|
||||
_tabBarView = [[UIView alloc]init];
|
||||
// _tabBarView.backgroundColor = UIColorRGBAlpha(0x000000, 0.2);
|
||||
}
|
||||
return _tabBarView;
|
||||
}
|
||||
|
||||
- (void)setDisplayModel:(XCGameRoomFaceViewDisplayModel *)displayModel {
|
||||
_displayModel = displayModel;
|
||||
if (displayModel.displayType == XCGameRoomFaceViewDisplayType_Noble) {
|
||||
|
||||
NSAssert(displayModel.titles.count > 0, @"if displayType is XCGameRoomFaceViewDisplayType_Noble,titles property can not be nil");
|
||||
self.titlesCollectionView.hidden = NO;
|
||||
self.frame = CGRectMake(0, 0, KScreenWidth, 274);
|
||||
}else if (displayModel.displayType == XCGameRoomFaceViewDisplayType_normal_corner) {
|
||||
self.titlesCollectionView.hidden = YES;
|
||||
|
||||
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(5, 5)];
|
||||
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
|
||||
maskLayer.frame = self.bounds;
|
||||
maskLayer.path = maskPath.CGPath;
|
||||
self.layer.mask = maskLayer;
|
||||
|
||||
self.frame = CGRectMake(0, 0, KScreenWidth, 234);
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
@@ -23,6 +23,7 @@
|
||||
///View
|
||||
#import "XPRoomSendTextView.h"
|
||||
#import "XPSendGiftView.h"
|
||||
#import "XPRoomFaceView.h"
|
||||
#import "SessionListViewController.h"
|
||||
#import "XPRoomMoreMenuViewController.h"
|
||||
|
||||
@@ -87,6 +88,14 @@
|
||||
case XPRoomMenuItemType_Voice: {
|
||||
[RtcManager instance].remoteMuted = !self.voiceButton.isSelected;
|
||||
self.voiceButton.selected = [RtcManager instance].isRemoteMuted;
|
||||
}
|
||||
break;
|
||||
|
||||
case XPRoomMenuItemType_Face: {
|
||||
NSString * roomUid = [NSString stringWithFormat:@"%ld", [self.delegate getRoomInfo].uid];
|
||||
XPRoomFaceView * faceView = [[XPRoomFaceView alloc] initWithRoomUid:roomUid];
|
||||
faceView.delegate = self.delegate;
|
||||
[TTPopup popupView:faceView style:TTPopupStyleActionSheet];
|
||||
}
|
||||
break;
|
||||
case XPRoomMenuItemType_Gift: {
|
||||
@@ -228,8 +237,10 @@
|
||||
self.micButton.hidden = NO;
|
||||
self.micButton.selected = model.microState.micState == MicroMicStateType_Close ? YES : [RtcManager instance].isLocalMuted;
|
||||
self.micButton.enabled = model.microState.micState == MicroMicStateType_Open;
|
||||
self.faceButton.hidden = NO;
|
||||
} else {
|
||||
self.micButton.hidden = YES;
|
||||
self.faceButton.hidden = YES;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -7,6 +7,9 @@
|
||||
|
||||
#import "ClientConfig.h"
|
||||
#import "Api+Main.h"
|
||||
/// tool
|
||||
#import "DESEncrypt.h"
|
||||
#import "XPConstant.h"
|
||||
|
||||
@interface ClientConfig ()
|
||||
///重试的次数 10次 如果你还是失败的话 那就算了 没办法了
|
||||
@@ -35,6 +38,20 @@
|
||||
self.openCandyTreeLimitLevel = [initData[@"openBoxSwitchLevelNo"] intValue];
|
||||
ClientDataModel * model = [ClientDataModel modelWithDictionary:data.data];
|
||||
self.configInfo = model;
|
||||
/* 表情包 */
|
||||
NSString *json = initData[@"faceJson"][@"json"];
|
||||
// NSString *deJson = [DESEncrypt decryptUseDES:json key:keyWithType(KeyType_FAcePwdEncode, NO)];
|
||||
// NSDictionary *faceInitData = [NSString dictionaryWithJsonString:deJson];
|
||||
// if (faceInitData) {
|
||||
// NSArray *arr = [NSArray yy_modelArrayWithClass:[FaceConfigInfo class] json:faceInitData[@"faces"]];
|
||||
// GetCore(FaceCore).version = [NSString stringWithFormat:@"%@",faceInitData[@"version"]];
|
||||
// GetCore(FaceCore).zipMd5 = [[NSString stringWithFormat:@"%@",faceInitData[@"zipMd5"]] uppercaseString];
|
||||
// GetCore(FaceCore).zipUrl = [NSURL URLWithString:[NSString stringWithFormat:@"%@",faceInitData[@"zipUrl"]]];
|
||||
//
|
||||
// NotifyCoreClient(AppInitClient, @selector(onGetFaceDataSuccess:), onGetFaceDataSuccess:arr);
|
||||
//
|
||||
// }
|
||||
|
||||
} else {
|
||||
if (self.retryCount < 10) {
|
||||
[self clientInit];
|
||||
|
Reference in New Issue
Block a user