用户资料卡片的显示
@@ -133,6 +133,12 @@
|
||||
E82109B026F1D83500FC3319 /* LoginBindPhonePresent.m in Sources */ = {isa = PBXBuildFile; fileRef = E82109AF26F1D83500FC3319 /* LoginBindPhonePresent.m */; };
|
||||
E82325E6274CCAFA003A3332 /* XPShareInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E82325E5274CCAFA003A3332 /* XPShareInfoModel.m */; };
|
||||
E82325E9274CE56A003A3332 /* XPShareItem.m in Sources */ = {isa = PBXBuildFile; fileRef = E82325E8274CE56A003A3332 /* XPShareItem.m */; };
|
||||
E82325F2274E2DE6003A3332 /* XPUserCardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E82325F1274E2DE6003A3332 /* XPUserCardViewController.m */; };
|
||||
E82325F5274E2E09003A3332 /* XPUserCardPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E82325F4274E2E09003A3332 /* XPUserCardPresenter.m */; };
|
||||
E82325F9274E2E42003A3332 /* Api+UserCard.m in Sources */ = {isa = PBXBuildFile; fileRef = E82325F8274E2E42003A3332 /* Api+UserCard.m */; };
|
||||
E82325FC274E4735003A3332 /* XPUserCardItemModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E82325FB274E4735003A3332 /* XPUserCardItemModel.m */; };
|
||||
E8232600274E48EA003A3332 /* XPUserCardItemCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E82325FF274E48EA003A3332 /* XPUserCardItemCollectionViewCell.m */; };
|
||||
E8232603274E4AA0003A3332 /* ThemeColor+UserCard.m in Sources */ = {isa = PBXBuildFile; fileRef = E8232602274E4AA0003A3332 /* ThemeColor+UserCard.m */; };
|
||||
E824543526F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E824543426F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m */; };
|
||||
E824543826F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E824543726F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.m */; };
|
||||
E824543A26F5880E00BE8163 /* XPLoginVerifBindPhoneProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E824543926F5822800BE8163 /* XPLoginVerifBindPhoneProtocol.h */; };
|
||||
@@ -153,6 +159,8 @@
|
||||
E824546426F5FF1C00BE8163 /* XPMineResetPayPasswordPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E824546326F5FF1C00BE8163 /* XPMineResetPayPasswordPresenter.m */; };
|
||||
E824546626F5FF6000BE8163 /* XPMineResetPayPasswordProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E824546526F5FF5100BE8163 /* XPMineResetPayPasswordProtocol.h */; };
|
||||
E82EE0F8272FDDFA00D15DC1 /* UserPrivacyView.m in Sources */ = {isa = PBXBuildFile; fileRef = E82EE0F7272FDDFA00D15DC1 /* UserPrivacyView.m */; };
|
||||
E833ED0A274F375100A2463B /* XPUserCardBaseView.m in Sources */ = {isa = PBXBuildFile; fileRef = E833ED09274F375100A2463B /* XPUserCardBaseView.m */; };
|
||||
E833ED0D274FAD1C00A2463B /* XPKickUserModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E833ED0C274FAD1C00A2463B /* XPKickUserModel.m */; };
|
||||
E83DB47A27462C4500D8CBD1 /* XPGiftBigPrizeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E83DB47927462C4500D8CBD1 /* XPGiftBigPrizeModel.m */; };
|
||||
E83DB47D2746372300D8CBD1 /* XPRoomGiftBannerView.m in Sources */ = {isa = PBXBuildFile; fileRef = E83DB47C2746372300D8CBD1 /* XPRoomGiftBannerView.m */; };
|
||||
E83DB481274649FB00D8CBD1 /* XPGiftBannerUserInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E83DB480274649FB00D8CBD1 /* XPGiftBannerUserInfoModel.m */; };
|
||||
@@ -532,6 +540,19 @@
|
||||
E82325E5274CCAFA003A3332 /* XPShareInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPShareInfoModel.m; sourceTree = "<group>"; };
|
||||
E82325E7274CE56A003A3332 /* XPShareItem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPShareItem.h; sourceTree = "<group>"; };
|
||||
E82325E8274CE56A003A3332 /* XPShareItem.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPShareItem.m; sourceTree = "<group>"; };
|
||||
E82325F0274E2DE6003A3332 /* XPUserCardViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPUserCardViewController.h; sourceTree = "<group>"; };
|
||||
E82325F1274E2DE6003A3332 /* XPUserCardViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPUserCardViewController.m; sourceTree = "<group>"; };
|
||||
E82325F3274E2E09003A3332 /* XPUserCardPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPUserCardPresenter.h; sourceTree = "<group>"; };
|
||||
E82325F4274E2E09003A3332 /* XPUserCardPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPUserCardPresenter.m; sourceTree = "<group>"; };
|
||||
E82325F6274E2E27003A3332 /* XPUserCardProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPUserCardProtocol.h; sourceTree = "<group>"; };
|
||||
E82325F7274E2E42003A3332 /* Api+UserCard.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+UserCard.h"; sourceTree = "<group>"; };
|
||||
E82325F8274E2E42003A3332 /* Api+UserCard.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Api+UserCard.m"; sourceTree = "<group>"; };
|
||||
E82325FA274E4735003A3332 /* XPUserCardItemModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPUserCardItemModel.h; sourceTree = "<group>"; };
|
||||
E82325FB274E4735003A3332 /* XPUserCardItemModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPUserCardItemModel.m; sourceTree = "<group>"; };
|
||||
E82325FE274E48EA003A3332 /* XPUserCardItemCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPUserCardItemCollectionViewCell.h; sourceTree = "<group>"; };
|
||||
E82325FF274E48EA003A3332 /* XPUserCardItemCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPUserCardItemCollectionViewCell.m; sourceTree = "<group>"; };
|
||||
E8232601274E4AA0003A3332 /* ThemeColor+UserCard.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ThemeColor+UserCard.h"; sourceTree = "<group>"; };
|
||||
E8232602274E4AA0003A3332 /* ThemeColor+UserCard.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "ThemeColor+UserCard.m"; sourceTree = "<group>"; };
|
||||
E824543326F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLoginVerifBindPhoneViewController.h; sourceTree = "<group>"; };
|
||||
E824543426F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPLoginVerifBindPhoneViewController.m; sourceTree = "<group>"; };
|
||||
E824543626F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLoginVerifBindPhonePresenter.h; sourceTree = "<group>"; };
|
||||
@@ -567,6 +588,10 @@
|
||||
E824546526F5FF5100BE8163 /* XPMineResetPayPasswordProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineResetPayPasswordProtocol.h; sourceTree = "<group>"; };
|
||||
E82EE0F6272FDDFA00D15DC1 /* UserPrivacyView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UserPrivacyView.h; sourceTree = "<group>"; };
|
||||
E82EE0F7272FDDFA00D15DC1 /* UserPrivacyView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UserPrivacyView.m; sourceTree = "<group>"; };
|
||||
E833ED08274F375100A2463B /* XPUserCardBaseView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPUserCardBaseView.h; sourceTree = "<group>"; };
|
||||
E833ED09274F375100A2463B /* XPUserCardBaseView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPUserCardBaseView.m; sourceTree = "<group>"; };
|
||||
E833ED0B274FAD1C00A2463B /* XPKickUserModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPKickUserModel.h; sourceTree = "<group>"; };
|
||||
E833ED0C274FAD1C00A2463B /* XPKickUserModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPKickUserModel.m; sourceTree = "<group>"; };
|
||||
E83DB47827462C4500D8CBD1 /* XPGiftBigPrizeModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPGiftBigPrizeModel.h; sourceTree = "<group>"; };
|
||||
E83DB47927462C4500D8CBD1 /* XPGiftBigPrizeModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPGiftBigPrizeModel.m; sourceTree = "<group>"; };
|
||||
E83DB47B2746372300D8CBD1 /* XPRoomGiftBannerView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomGiftBannerView.h; sourceTree = "<group>"; };
|
||||
@@ -1551,6 +1576,78 @@
|
||||
path = UIImage;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E82325EA274E2D52003A3332 /* UserCard */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E82325EB274E2D6C003A3332 /* Model */,
|
||||
E82325EC274E2D7A003A3332 /* Api */,
|
||||
E82325ED274E2D8E003A3332 /* View */,
|
||||
E82325EE274E2D97003A3332 /* Presenter */,
|
||||
E82325EF274E2DA0003A3332 /* Protocol */,
|
||||
E8232601274E4AA0003A3332 /* ThemeColor+UserCard.h */,
|
||||
E8232602274E4AA0003A3332 /* ThemeColor+UserCard.m */,
|
||||
);
|
||||
path = UserCard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E82325EB274E2D6C003A3332 /* Model */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E82325FA274E4735003A3332 /* XPUserCardItemModel.h */,
|
||||
E82325FB274E4735003A3332 /* XPUserCardItemModel.m */,
|
||||
E833ED0B274FAD1C00A2463B /* XPKickUserModel.h */,
|
||||
E833ED0C274FAD1C00A2463B /* XPKickUserModel.m */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E82325EC274E2D7A003A3332 /* Api */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E82325F7274E2E42003A3332 /* Api+UserCard.h */,
|
||||
E82325F8274E2E42003A3332 /* Api+UserCard.m */,
|
||||
);
|
||||
path = Api;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E82325ED274E2D8E003A3332 /* View */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E82325FD274E48D0003A3332 /* Cell */,
|
||||
E82325F0274E2DE6003A3332 /* XPUserCardViewController.h */,
|
||||
E82325F1274E2DE6003A3332 /* XPUserCardViewController.m */,
|
||||
E833ED08274F375100A2463B /* XPUserCardBaseView.h */,
|
||||
E833ED09274F375100A2463B /* XPUserCardBaseView.m */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E82325EE274E2D97003A3332 /* Presenter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E82325F3274E2E09003A3332 /* XPUserCardPresenter.h */,
|
||||
E82325F4274E2E09003A3332 /* XPUserCardPresenter.m */,
|
||||
);
|
||||
path = Presenter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E82325EF274E2DA0003A3332 /* Protocol */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E82325F6274E2E27003A3332 /* XPUserCardProtocol.h */,
|
||||
);
|
||||
path = Protocol;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E82325FD274E48D0003A3332 /* Cell */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E82325FE274E48EA003A3332 /* XPUserCardItemCollectionViewCell.h */,
|
||||
E82325FF274E48EA003A3332 /* XPUserCardItemCollectionViewCell.m */,
|
||||
);
|
||||
path = Cell;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E83DB47E274649B200D8CBD1 /* Model */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -1881,6 +1978,7 @@
|
||||
E8AEAED8271413530017FCE0 /* View */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E82325EA274E2D52003A3332 /* UserCard */,
|
||||
E8AEAED4271412EC0017FCE0 /* XPRoomViewController.h */,
|
||||
E8AEAED5271412EC0017FCE0 /* XPRoomViewController.m */,
|
||||
181D7F222727DB1E00B7C059 /* RoomHostDelegate.h */,
|
||||
@@ -2366,6 +2464,7 @@
|
||||
E890BC07273CF1800007C46B /* XPGiftCountCollectionViewCell.m in Sources */,
|
||||
E8EEB91126FC6AE2007C6EBA /* XPMineUserInfoEditProtocol.h in Sources */,
|
||||
E8EEB90326FC31DC007C6EBA /* XPMineUserInfoProtocol.h in Sources */,
|
||||
E8232603274E4AA0003A3332 /* ThemeColor+UserCard.m in Sources */,
|
||||
E87A24F1272935920086A794 /* XPMessageRemoteExtModel.m in Sources */,
|
||||
E88B5CBA26FB329C00DA9178 /* XPMineTeenagerPwdProtocol.h in Sources */,
|
||||
E88B5CB226FB1CFF00DA9178 /* XPMineTeenagerProtocol.h in Sources */,
|
||||
@@ -2391,6 +2490,7 @@
|
||||
E81C27A226EF23490031E639 /* XPEnum.h in Sources */,
|
||||
E88B5CB526FB20B800DA9178 /* XPMineTeenagerPwdView.m in Sources */,
|
||||
E81C279826EB3AC40031E639 /* LoginForgetPasswordProtocol.h in Sources */,
|
||||
E82325F9274E2E42003A3332 /* Api+UserCard.m in Sources */,
|
||||
E82109B026F1D83500FC3319 /* LoginBindPhonePresent.m in Sources */,
|
||||
E865963F27015A9C00846EBD /* XPMineUserTableView.m in Sources */,
|
||||
E8B825C726EA0D9A009E8E9F /* LoginVerifCodeProtocol.h in Sources */,
|
||||
@@ -2406,6 +2506,7 @@
|
||||
E86596512701A1C000846EBD /* StatisticsService.m in Sources */,
|
||||
E824544026F58F9400BE8163 /* XPMinePayPwdViewController.m in Sources */,
|
||||
E890BC04273CF0500007C46B /* XPGiftCountModel.m in Sources */,
|
||||
E82325F5274E2E09003A3332 /* XPUserCardPresenter.m in Sources */,
|
||||
E8AC723D26F4B6AA007D6E91 /* XPLoginBindPhoneResultViewController.m in Sources */,
|
||||
189DD73E26E21C3F00AB55B1 /* YYUtility.m in Sources */,
|
||||
E8E70D8926F2F58F00F03460 /* XPMineMatchTableViewCell.m in Sources */,
|
||||
@@ -2424,6 +2525,7 @@
|
||||
E8E70D7A26F2F16600F03460 /* XPMinePresent.m in Sources */,
|
||||
9B7D80562753C595003DAC0C /* SendMessageView.m in Sources */,
|
||||
E84B0E3F2727EDF6008818C6 /* XPRoomMessageTableViewCell.m in Sources */,
|
||||
E82325FC274E4735003A3332 /* XPUserCardItemModel.m in Sources */,
|
||||
E8EEB8F226FC2050007C6EBA /* SDPhotoBrowser.m in Sources */,
|
||||
E81C27AB26EF2D920031E639 /* ThirdUserInfo.m in Sources */,
|
||||
E8788950273A699900BF1D57 /* ThemeColor+SendGift.m in Sources */,
|
||||
@@ -2452,6 +2554,7 @@
|
||||
186A534E26FC6ED900D67B2C /* TTPopupService.m in Sources */,
|
||||
18A61BD7274F7F6900A09A54 /* NetImageConfig.m in Sources */,
|
||||
E8C21501274B76F60079E6BF /* XPRoomAnimationHitView.m in Sources */,
|
||||
E833ED0A274F375100A2463B /* XPUserCardBaseView.m in Sources */,
|
||||
E8AC722426F47E5E007D6E91 /* XPMineFeedbackViewController.m in Sources */,
|
||||
9B7D804D27537950003DAC0C /* MessageCell.m in Sources */,
|
||||
E81366E326F0A1FC0076364C /* LoginBindPhoneViewController.m in Sources */,
|
||||
@@ -2469,6 +2572,7 @@
|
||||
E8B846C226FD82DC00A777FE /* XPMineUserInfoAlbumCollectionViewCell.m in Sources */,
|
||||
E8EEB91726FC7B35007C6EBA /* XPMineUserInfoDesViewController.m in Sources */,
|
||||
180806FB2729A354001FD836 /* ThemeColor+Room.m in Sources */,
|
||||
E82325F2274E2DE6003A3332 /* XPUserCardViewController.m in Sources */,
|
||||
E8E70D8626F2F55C00F03460 /* XPMineAccountView.m in Sources */,
|
||||
E878893C273A54C300BF1D57 /* Api+Gift.m in Sources */,
|
||||
E81C279026EB314D0031E639 /* LoginForgetEditView.m in Sources */,
|
||||
@@ -2570,6 +2674,7 @@
|
||||
187EEEE126E89BFB002833B2 /* AccountModel.m in Sources */,
|
||||
E8AC722126F47E23007D6E91 /* XPMineAboutUsViewController.m in Sources */,
|
||||
18F403CB2758C66800A6C548 /* MessageContentText.m in Sources */,
|
||||
E8232600274E48EA003A3332 /* XPUserCardItemCollectionViewCell.m in Sources */,
|
||||
E88B5CC526FB42B000DA9178 /* XPMineUserInfoHeaderView.m in Sources */,
|
||||
E8EEB8FB26FC2874007C6EBA /* XPMineUserInfoTableViewCell.m in Sources */,
|
||||
E8AC721626F46B06007D6E91 /* XPMineSettingTableViewCell.m in Sources */,
|
||||
@@ -2586,6 +2691,7 @@
|
||||
E884C36C2743951B00E1EBED /* GiftReceiveInfoModel.m in Sources */,
|
||||
189DD75926E6003C00AB55B1 /* Api.m in Sources */,
|
||||
E8133916273E532D00708B66 /* XPGiftItemCollectionViewCell.m in Sources */,
|
||||
E833ED0D274FAD1C00A2463B /* XPKickUserModel.m in Sources */,
|
||||
E8788934273A53D700BF1D57 /* XPSendGiftView.m in Sources */,
|
||||
E88B5CB826FB325200DA9178 /* XPMineTeenagerPwdPresenter.m in Sources */,
|
||||
E84B0E462727EF9D008818C6 /* XPRoomMessageParser.m in Sources */,
|
||||
|
6
xplan-ios/Assets.xcassets/Room/UserCard/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
22
xplan-ios/Assets.xcassets/Room/UserCard/usercard_attention_disable.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_attention_disable@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_attention_disable@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 842 B |
After Width: | Height: | Size: 1.4 KiB |
22
xplan-ios/Assets.xcassets/Room/UserCard/usercard_attention_normal.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_attention_normal@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_attention_normal@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
22
xplan-ios/Assets.xcassets/Room/UserCard/usercard_blacklist_normal.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_blacklist_normal@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_blacklist_normal@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 858 B |
After Width: | Height: | Size: 1.6 KiB |
22
xplan-ios/Assets.xcassets/Room/UserCard/usercard_chat_normal.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_chat_normal@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_chat_normal@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Room/UserCard/usercard_chat_normal.imageset/usercard_chat_normal@2x.png
vendored
Normal file
After Width: | Height: | Size: 1009 B |
BIN
xplan-ios/Assets.xcassets/Room/UserCard/usercard_chat_normal.imageset/usercard_chat_normal@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.9 KiB |
22
xplan-ios/Assets.xcassets/Room/UserCard/usercard_close.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_close@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_close@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Room/UserCard/usercard_close.imageset/usercard_close@2x.png
vendored
Normal file
After Width: | Height: | Size: 558 B |
BIN
xplan-ios/Assets.xcassets/Room/UserCard/usercard_close.imageset/usercard_close@3x.png
vendored
Normal file
After Width: | Height: | Size: 991 B |
22
xplan-ios/Assets.xcassets/Room/UserCard/usercard_kickout_normal.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_kickout_normal@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_kickout_normal@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 934 B |
After Width: | Height: | Size: 1.6 KiB |
22
xplan-ios/Assets.xcassets/Room/UserCard/usercard_manager_disable.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_manager_disable@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_manager_disable@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 783 B |
After Width: | Height: | Size: 1.4 KiB |
22
xplan-ios/Assets.xcassets/Room/UserCard/usercard_manager_normal.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_manager_normal@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_manager_normal@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 899 B |
After Width: | Height: | Size: 1.6 KiB |
22
xplan-ios/Assets.xcassets/Room/UserCard/usercard_sendgift_normal.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_sendgift_normal@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "usercard_sendgift_normal@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 803 B |
After Width: | Height: | Size: 1.4 KiB |
@@ -52,6 +52,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,assign) long birth;
|
||||
///是否实名认证
|
||||
@property (nonatomic,assign) BOOL isCertified;
|
||||
///铭牌背景
|
||||
@property (nonatomic, copy) NSString *nameplatePic;
|
||||
///铭牌名称
|
||||
@property (nonatomic, copy) NSString *nameplateWord;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -16,6 +16,8 @@ typedef NS_ENUM(NSUInteger, CustomMessageType) {
|
||||
CustomMessageType_Gift = 3,
|
||||
///全麦送
|
||||
CustomMessageType_ALLMicroSend = 12,
|
||||
///踢出房间
|
||||
CustomMessageType_Kick_User = 18,
|
||||
///福袋消息
|
||||
CustomMessageType_LuckyBag = 61,
|
||||
};
|
||||
@@ -51,6 +53,14 @@ typedef NS_ENUM(NSUInteger, CustomMessageSubAllMicroSend) {
|
||||
Custom_Message_Sub_AllMicroLuckySend = 125,
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Kick_User
|
||||
typedef NS_ENUM(NSUInteger, CustomNotificationSubKick) {
|
||||
///拉黑
|
||||
Custom_Message_Sub_Kick_BlackList = 182,
|
||||
///踢出房间
|
||||
Custom_Message_Sub_Kick_BeKicked = 181,
|
||||
} ;
|
||||
|
||||
///first = CustomMessageType_LuckyBag
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageSubLuckyBag) {
|
||||
/// 福袋礼物房间飘屏通知
|
||||
|
@@ -23,6 +23,8 @@
|
||||
|
||||
#import "RtcManager.h"
|
||||
|
||||
#import "XPUserCardViewController.h"
|
||||
|
||||
@interface XPRoomMenuContainerView ()
|
||||
///
|
||||
@property (nonatomic,strong) UIStackView *stackView;
|
||||
@@ -80,14 +82,14 @@
|
||||
break;
|
||||
case XPRoomMenuItemType_Gift: {
|
||||
NSString * roomUid = [NSString stringWithFormat:@"%ld", [self.delegate getRoomInfo].uid];
|
||||
|
||||
XPSendGiftView * giftView = [[XPSendGiftView alloc] initWithType:SendGiftType_Room uid:roomUid];
|
||||
giftView.delegate = self.delegate;
|
||||
NSArray * giftUses = [self configGiftUsers:[self.delegate getMicroQueue]];
|
||||
[giftView configGiftUsers:giftUses];
|
||||
[TTPopup popupView:giftView style:TTPopupStyleActionSheet];
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
28
xplan-ios/Main/Room/View/UserCard/Api/Api+UserCard.h
Normal file
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// Api+UserCard.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/24.
|
||||
//
|
||||
|
||||
#import "Api.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface Api (UserCard)
|
||||
/// 查询两个人的关注状态
|
||||
/// @param complection 完成
|
||||
/// @param uid 自己的uid
|
||||
/// @param isLikeUid 要查询的那个人的uid
|
||||
+ (void)attentionStatusComplection:(HttpRequestHelperCompletion)complection uid:(NSString *)uid isLikeUid:(NSString *)isLikeUid;
|
||||
|
||||
/// 关注某人
|
||||
/// @param complection 完成
|
||||
/// @param uid 发起关注的人
|
||||
/// @param likedUid 被关注的人
|
||||
/// @param ticket ticket
|
||||
/// @param type l类型默认1
|
||||
+ (void)attentionComplection:(HttpRequestHelperCompletion)complection uid:(NSString *)uid likedUid:(NSString *)likedUid ticket:(NSString *)ticket type:(NSString *)type;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
34
xplan-ios/Main/Room/View/UserCard/Api/Api+UserCard.m
Normal file
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// Api+UserCard.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/24.
|
||||
//
|
||||
|
||||
#import "Api+UserCard.h"
|
||||
|
||||
|
||||
|
||||
@implementation Api (UserCard)
|
||||
|
||||
|
||||
/// 查询两个人的关注状态
|
||||
/// @param complection 完成
|
||||
/// @param uid 自己的uid
|
||||
/// @param isLikeUid 要查询的那个人的uid
|
||||
+ (void)attentionStatusComplection:(HttpRequestHelperCompletion)complection uid:(NSString *)uid isLikeUid:(NSString *)isLikeUid {
|
||||
[self makeRequest:@"fans/islike" method:HttpRequestHelperMethodGET completion:complection,__FUNCTION__, uid, isLikeUid, nil];
|
||||
}
|
||||
|
||||
|
||||
/// 关注某人
|
||||
/// @param complection 完成
|
||||
/// @param uid 发起关注的人
|
||||
/// @param likedUid 被关注的人
|
||||
/// @param ticket ticket
|
||||
/// @param type 1 关注 2取消关注
|
||||
+ (void)attentionComplection:(HttpRequestHelperCompletion)complection uid:(NSString *)uid likedUid:(NSString *)likedUid ticket:(NSString *)ticket type:(NSString *)type {
|
||||
[self makeRequest:@"fans/like" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, uid, likedUid, ticket, type, nil];
|
||||
}
|
||||
|
||||
@end
|
25
xplan-ios/Main/Room/View/UserCard/Model/XPKickUserModel.h
Normal file
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// XPKickUserModel.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/25.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPKickUserModel : NSObject
|
||||
///安卓使用的是Uid 所以加了一个这样的属性
|
||||
@property (nonatomic, assign) NSInteger uid;
|
||||
///处理de uid
|
||||
@property (nonatomic, assign) NSInteger handleUid;
|
||||
///处理人的昵称
|
||||
@property (nonatomic, copy) NSString *handleNick;
|
||||
///目标用户的uid
|
||||
@property (nonatomic, assign) NSInteger targetUid;
|
||||
///目标用户的昵称
|
||||
@property (nonatomic, copy) NSString *targetNick;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
12
xplan-ios/Main/Room/View/UserCard/Model/XPKickUserModel.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// XPKickUserModel.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/25.
|
||||
//
|
||||
|
||||
#import "XPKickUserModel.h"
|
||||
|
||||
@implementation XPKickUserModel
|
||||
|
||||
@end
|
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// XPUserCardItemModel.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/24.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
typedef NS_ENUM(NSUInteger, UserCardItemType){
|
||||
UserCardItemType_Gift = 1,
|
||||
///私聊
|
||||
UserCardItemType_Chat = 2,
|
||||
///关注
|
||||
UserCardItemType_Attention = 3,
|
||||
///设置管理
|
||||
UserCardItemType_Manager = 4,
|
||||
///拉黑
|
||||
UserCardItemType_Black = 5,
|
||||
///踢出房间
|
||||
UserCardItemType_KickOut = 6
|
||||
};
|
||||
|
||||
|
||||
@interface XPUserCardItemModel : NSObject
|
||||
|
||||
///普通状态的图片名字
|
||||
@property (nonatomic,copy) NSString *imageName;
|
||||
///选择状态的图片的名字
|
||||
@property (nonatomic,copy) NSString *selectImageName;
|
||||
///普通状态下的标题
|
||||
@property (nonatomic,copy) NSString *title;
|
||||
///选择状态下的标题
|
||||
@property (nonatomic,copy) NSString *selectTitle;
|
||||
///类型
|
||||
@property (nonatomic,assign) UserCardItemType type;
|
||||
///是否是选中状态
|
||||
@property (nonatomic,assign) BOOL isSelect;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// XPUserCardItemModel.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/24.
|
||||
//
|
||||
|
||||
#import "XPUserCardItemModel.h"
|
||||
|
||||
@implementation XPUserCardItemModel
|
||||
|
||||
@end
|
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// XPUserCardPresenter.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/24.
|
||||
//
|
||||
|
||||
#import "BaseMvpPresenter.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPUserCardPresenter : BaseMvpPresenter
|
||||
/// 获取用户信息
|
||||
/// @param uid 查询的用户的uid
|
||||
- (void)getUserInfo:(NSString *)uid;
|
||||
|
||||
/// 获取用户卡片中中间操作按钮的数据源
|
||||
/// @param targetUid 目标用户的id
|
||||
/// @param roomId 房间的id
|
||||
- (void)getFunctionItems:(NSString *)targetUid roomid:(NSString *)roomId;
|
||||
|
||||
///抱她上麦的 数据
|
||||
/// @param micCount 当前麦序的个数
|
||||
- (void)getRoomMicroItems:(int)micCount;
|
||||
|
||||
/// 关注用户 /取消该关注
|
||||
/// @param targetUid 目标用户的uid
|
||||
/// @param status 是否关注 yes 关注 NO 取消关注
|
||||
- (void)attentionUser:(NSString *)targetUid status:(BOOL)status;
|
||||
|
||||
/// 加入黑名单
|
||||
/// @param targetUid 目标用户的uid
|
||||
/// @param roomId 房间的uid
|
||||
- (void)makeUserBlack:(NSString *)targetUid roomId:(NSString *)roomId;
|
||||
|
||||
/// 设置/取消 管理员
|
||||
/// @param targetUid 目标用户的id
|
||||
/// @param roomId 房间的id
|
||||
/// @param enable YES设置 NO取消
|
||||
- (void)makeUserManager:(NSString *)targetUid roomId:(NSString *)roomId enable:(BOOL)enable;
|
||||
|
||||
/// 踢出房间
|
||||
/// @param targetUid 用户的uid
|
||||
/// @param roomId 房间的uid
|
||||
- (void)makeKickUser:(NSString *)targetUid roomId:(NSString *)roomId;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,290 @@
|
||||
//
|
||||
// XPUserCardPresenter.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/24.
|
||||
//
|
||||
|
||||
#import "XPUserCardPresenter.h"
|
||||
///Third
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
#import <ReactiveObjC/ReactiveObjC.h>
|
||||
///Tool
|
||||
#import "Api+UserCard.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
///Model
|
||||
#import "UserInfoModel.h"
|
||||
#import "XPUserCardItemModel.h"
|
||||
///P
|
||||
#import "XPUserCardProtocol.h"
|
||||
|
||||
@interface XPUserCardPresenter ()
|
||||
///礼物的
|
||||
@property (nonatomic,strong) XPUserCardItemModel *giftItem;
|
||||
///私聊
|
||||
@property (nonatomic,strong) XPUserCardItemModel *chatItem;
|
||||
///关注
|
||||
@property (nonatomic,strong) XPUserCardItemModel *attentionItem;
|
||||
///设置管理员
|
||||
@property (nonatomic,strong) XPUserCardItemModel *managerItem;
|
||||
///踢出房间
|
||||
@property (nonatomic,strong) XPUserCardItemModel *kikoutItem;
|
||||
///加入黑名单
|
||||
@property (nonatomic,strong) XPUserCardItemModel *blackItem;
|
||||
///操作的数组
|
||||
@property (nonatomic,strong) NSMutableArray * functionArray;
|
||||
@end
|
||||
|
||||
@implementation XPUserCardPresenter
|
||||
|
||||
/// 获取用户信息
|
||||
/// @param uid 查询的用户的uid
|
||||
- (void)getUserInfo:(NSString *)uid {
|
||||
if (uid == nil) {
|
||||
return;
|
||||
}
|
||||
[Api getUserInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
UserInfoModel * infoModel = [UserInfoModel modelWithDictionary:data.data];
|
||||
[[self getView] onGetUserInfoSuccess:infoModel];
|
||||
}] uid:uid];
|
||||
}
|
||||
|
||||
|
||||
/// 两个人的关注状态
|
||||
/// @param uid 自己的uid
|
||||
/// @param targetUid 对方的uid
|
||||
- (void)userAttentionStatus:(NSString *)uid targetUid:(NSString *)targetUid {
|
||||
[Api attentionStatusComplection:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
BOOL isLike = ((NSNumber *)data.data).boolValue;
|
||||
self.attentionItem.isSelect = isLike;
|
||||
[[self getView] onGetFunctionArraySccess:self.functionArray];
|
||||
}] uid:uid isLikeUid:targetUid];
|
||||
}
|
||||
|
||||
|
||||
/// 获取用户卡片中中间操作按钮的数据源
|
||||
/// @param targetUid 目标用户的id
|
||||
/// @param roomId 房间的id
|
||||
- (void)getFunctionItems:(NSString *)targetUid roomid:(NSString *)roomId{
|
||||
NSString * uid = [[AccountInfoStorage instance] getUid];
|
||||
if ([uid isEqualToString:targetUid]) { ///查看自己的话 没有中间的数据
|
||||
return;
|
||||
} else {
|
||||
[self.functionArray removeAllObjects];
|
||||
[self.functionArray addObject:self.giftItem];
|
||||
[self.functionArray addObject:self.chatItem];
|
||||
[self.functionArray addObject:self.attentionItem];
|
||||
///改变一下关注的状态
|
||||
[self userAttentionStatus:uid targetUid:targetUid];
|
||||
@weakify(self);
|
||||
[[self rac_queryChatRoomMember:uid roomId:roomId] subscribeNext:^(id _Nullable x) {
|
||||
@strongify(self);
|
||||
NIMChatroomMember * member = x;
|
||||
if (x == nil) {return;}
|
||||
if (member.type == NIMChatroomMemberTypeCreator) {///房主 踢出房间 设置管理员 拉黑
|
||||
[self.functionArray addObject:self.kikoutItem];
|
||||
[self.functionArray addObject:self.managerItem];
|
||||
[self.functionArray addObject:self.blackItem];
|
||||
///查看 目标用户是否是管理员
|
||||
[[self rac_queryChatRoomMember:targetUid roomId:roomId] subscribeNext:^(id _Nullable x) {
|
||||
NIMChatroomMember * targetMember = x;
|
||||
if (x == nil) {return;}
|
||||
if (targetMember.type == NIMChatroomMemberTypeManager) {
|
||||
self.managerItem.isSelect = YES;
|
||||
[[self getView] onGetFunctionArraySccess:self.functionArray];
|
||||
}
|
||||
}];
|
||||
} else if(member.type == NIMChatroomMemberTypeManager) {///操作者是 管理员 踢出房间 拉黑
|
||||
//////查看 目标用户是否是管理员
|
||||
[[self rac_queryChatRoomMember:targetUid roomId:roomId] subscribeNext:^(id _Nullable x) {
|
||||
NIMChatroomMember * targetMember = x;
|
||||
if (x == nil) {return;}
|
||||
if (targetMember.type != NIMChatroomMemberTypeManager || targetMember.type != NIMChatroomMemberTypeCreator) { ///目标是管理员
|
||||
[self.functionArray addObject:self.kikoutItem];
|
||||
[self.functionArray addObject:self.blackItem];
|
||||
[[self getView] onGetFunctionArraySccess:self.functionArray];
|
||||
} else {
|
||||
[[self getView] onGetFunctionArraySccess:self.functionArray];
|
||||
}
|
||||
}];
|
||||
} else {
|
||||
[[self getView] onGetFunctionArraySccess:self.functionArray];
|
||||
}
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
///抱她上麦的 数据
|
||||
/// @param micCount 当前麦序的个数
|
||||
- (void)getRoomMicroItems:(int)micCount {
|
||||
[self.functionArray removeAllObjects];
|
||||
for (int i = 0; i < micCount; i++) {
|
||||
XPUserCardItemModel * item = [[XPUserCardItemModel alloc] init];
|
||||
if (i == 0) {
|
||||
item.title = @"房主位";
|
||||
} else {
|
||||
item.title = [NSString stringWithFormat:@"%d号麦", i];
|
||||
}
|
||||
item.imageName = @"";
|
||||
[self.functionArray addObject:item];
|
||||
}
|
||||
[[self getView] onGetFunctionArraySccess:self.functionArray];
|
||||
}
|
||||
|
||||
|
||||
/// 关注用户 /取消该关注
|
||||
/// @param targetUid 目标用户的uid
|
||||
/// @param status 是否关注 yes 关注 NO 取消关注
|
||||
- (void)attentionUser:(NSString *)targetUid status:(BOOL)status {
|
||||
NSString * uid = [[AccountInfoStorage instance] getUid];
|
||||
NSString * ticket = [[AccountInfoStorage instance] getTicket];
|
||||
NSString * type = status ? @"1" : @"2";
|
||||
[Api attentionComplection:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
self.attentionItem.isSelect = status;
|
||||
[[self getView] attentionUserSuccess:self.attentionItem];
|
||||
}] uid:uid likedUid:targetUid ticket:ticket type:type];
|
||||
}
|
||||
|
||||
|
||||
/// 加入黑名单
|
||||
/// @param targetUid 目标用户的uid
|
||||
/// @param roomId 房间的uid
|
||||
- (void)makeUserBlack:(NSString *)targetUid roomId:(NSString *)roomId{
|
||||
NIMChatroomMemberUpdateRequest *request = [[NIMChatroomMemberUpdateRequest alloc]init];
|
||||
request.roomId = roomId;
|
||||
request.userId = targetUid;
|
||||
request.enable = YES;
|
||||
[[NIMSDK sharedSDK].chatroomManager updateMemberBlack:request completion:^(NSError * _Nullable error) {
|
||||
[[self getView] makeUserBlackFinish:error];
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
/// 设置/取消 管理员
|
||||
/// @param targetUid 目标用户的id
|
||||
/// @param roomId 房间的id
|
||||
/// @param enable YES设置 NO取消
|
||||
- (void)makeUserManager:(NSString *)targetUid roomId:(NSString *)roomId enable:(BOOL)enable{
|
||||
NIMChatroomMemberUpdateRequest *request = [[NIMChatroomMemberUpdateRequest alloc]init];
|
||||
request.roomId = roomId;
|
||||
request.userId = targetUid;
|
||||
request.enable = enable;
|
||||
[[NIMSDK sharedSDK].chatroomManager markMemberManager:request completion:^(NSError * _Nullable error) {
|
||||
if (error == nil) {
|
||||
self.managerItem.isSelect = enable;
|
||||
}
|
||||
[[self getView] markUserManagerFinish:self.managerItem error:error];
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
/// 踢出房间
|
||||
/// @param targetUid 用户的uid
|
||||
/// @param roomId 房间的uid
|
||||
- (void)makeKickUser:(NSString *)targetUid roomId:(NSString *)roomId {
|
||||
NSString * uid = [[AccountInfoStorage instance] getUid];
|
||||
NIMChatroomMemberKickRequest *request = [[NIMChatroomMemberKickRequest alloc] init];
|
||||
request.roomId = roomId;
|
||||
request.userId = targetUid;
|
||||
request.notifyExt = [@{@"reason":@"kick",@"account":targetUid,@"handleUid":uid} toJSONString];
|
||||
[[NIMSDK sharedSDK].chatroomManager kickMember:request completion:^(NSError * _Nullable error) {
|
||||
[[self getView] makeKickUserFinish:error];
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
///获取房间角色
|
||||
- (RACSignal *)rac_queryChatRoomMember:(NSString *)uid roomId:(NSString *)roomId{
|
||||
return [RACSignal createSignal:^RACDisposable *(id<RACSubscriber> subscriber) {
|
||||
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
|
||||
request.roomId = roomId;
|
||||
request.userIds = @[uid];
|
||||
[[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray<NIMChatroomMember *> * _Nullable members) {
|
||||
if (error == nil) {
|
||||
[subscriber sendNext:members.firstObject];
|
||||
[subscriber sendCompleted];
|
||||
}else {
|
||||
[subscriber sendNext:nil];
|
||||
[subscriber sendCompleted];
|
||||
}
|
||||
}];
|
||||
return nil;
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (NSMutableArray *)functionArray {
|
||||
if (!_functionArray) {
|
||||
_functionArray = [NSMutableArray array];
|
||||
}
|
||||
return _functionArray;
|
||||
}
|
||||
|
||||
- (XPUserCardItemModel *)giftItem {
|
||||
if (!_giftItem) {
|
||||
_giftItem = [[XPUserCardItemModel alloc] init];
|
||||
_giftItem.title = @"送礼物";
|
||||
_giftItem.imageName = @"usercard_sendgift_normal";
|
||||
_giftItem.selectImageName = @"usercard_sendgift_normal";
|
||||
_giftItem.type = UserCardItemType_Gift;
|
||||
}
|
||||
return _giftItem;
|
||||
}
|
||||
|
||||
- (XPUserCardItemModel *)chatItem {
|
||||
if (!_chatItem) {
|
||||
_chatItem = [[XPUserCardItemModel alloc] init];
|
||||
_chatItem.title = @"私聊";
|
||||
_chatItem.imageName = @"usercard_chat_normal";
|
||||
_chatItem.selectImageName = @"usercard_chat_normal";
|
||||
_chatItem.type = UserCardItemType_Chat;
|
||||
}
|
||||
return _chatItem;
|
||||
}
|
||||
|
||||
- (XPUserCardItemModel *)attentionItem {
|
||||
if (!_attentionItem) {
|
||||
_attentionItem = [[XPUserCardItemModel alloc] init];
|
||||
_attentionItem.title = @"关注Ta";
|
||||
_attentionItem.imageName = @"usercard_attention_normal";
|
||||
_attentionItem.selectTitle = @"已关注";
|
||||
_attentionItem.selectImageName = @"usercard_attention_disable";
|
||||
_attentionItem.type = UserCardItemType_Attention;
|
||||
}
|
||||
return _attentionItem;
|
||||
}
|
||||
|
||||
- ( XPUserCardItemModel *)kikoutItem {
|
||||
if (!_kikoutItem) {
|
||||
_kikoutItem = [[XPUserCardItemModel alloc] init];
|
||||
_kikoutItem.title = @"踢出房间";
|
||||
_kikoutItem.imageName = @"usercard_kickout_normal";
|
||||
_kikoutItem.selectImageName = @"usercard_kickout_normal";
|
||||
_kikoutItem.type = UserCardItemType_KickOut;
|
||||
}
|
||||
return _kikoutItem;
|
||||
}
|
||||
|
||||
- (XPUserCardItemModel *)managerItem {
|
||||
if (!_managerItem) {
|
||||
_managerItem = [[XPUserCardItemModel alloc] init];
|
||||
_managerItem.title = @"设置管理员";
|
||||
_managerItem.imageName = @"usercard_manager_normal";
|
||||
_managerItem.selectTitle = @"取消管理员";
|
||||
_managerItem.selectImageName = @"usercard_manager_disable";
|
||||
_managerItem.type = UserCardItemType_Manager;
|
||||
}
|
||||
return _managerItem;
|
||||
}
|
||||
|
||||
- (XPUserCardItemModel *)blackItem {
|
||||
if (!_blackItem) {
|
||||
_blackItem = [[XPUserCardItemModel alloc] init];
|
||||
_blackItem.title = @"拉入黑名单";
|
||||
_blackItem.imageName = @"usercard_blacklist_normal";
|
||||
_blackItem.type = UserCardItemType_Black;
|
||||
}
|
||||
return _blackItem;
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// XPUserCardProtocol.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/24.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class UserInfoModel, XPUserCardItemModel;
|
||||
@protocol XPUserCardProtocol <NSObject>
|
||||
|
||||
///获取用户信息成功
|
||||
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo;
|
||||
///获取用户卡片中 functioin的数据源
|
||||
- (void)onGetFunctionArraySccess:(NSArray<XPUserCardItemModel *> *)array;
|
||||
///关注成功
|
||||
- (void)attentionUserSuccess:(XPUserCardItemModel *)item;
|
||||
///加入黑名单
|
||||
- (void)makeUserBlackFinish:(NSError *)error;
|
||||
///设置管理 取消管理员 成功
|
||||
- (void)markUserManagerFinish:(XPUserCardItemModel *)item error:(NSError *)error;
|
||||
/// 踢出房间
|
||||
- (void)makeKickUserFinish:(NSError *)error;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
22
xplan-ios/Main/Room/View/UserCard/ThemeColor+UserCard.h
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// ThemeColor+UserCard.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/24.
|
||||
//
|
||||
|
||||
#import "ThemeColor.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface ThemeColor (UserCard)
|
||||
/// 0x66666
|
||||
+ (UIColor *)userSubTitleColor;
|
||||
|
||||
/// 操作坑位的字体颜色 333333
|
||||
+ (UIColor *)userMicroTitleColor;
|
||||
/// 用户卡片 分割线的颜色 #F1F1F1
|
||||
+ (UIColor *)userDividerColor;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
28
xplan-ios/Main/Room/View/UserCard/ThemeColor+UserCard.m
Normal file
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// ThemeColor+UserCard.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/24.
|
||||
//
|
||||
|
||||
#import "ThemeColor+UserCard.h"
|
||||
|
||||
@implementation ThemeColor (UserCard)
|
||||
|
||||
|
||||
/// 0x66666
|
||||
+ (UIColor *)userSubTitleColor {
|
||||
return UIColorFromRGB(0x666666);
|
||||
}
|
||||
|
||||
/// 操作坑位的字体颜色 333333
|
||||
+ (UIColor *)userMicroTitleColor {
|
||||
return UIColorFromRGB(0x333333);
|
||||
}
|
||||
|
||||
/// 用户卡片 分割线的颜色 #F1F1F1
|
||||
+ (UIColor *)userDividerColor {
|
||||
return UIColorFromRGB(0xF1F1F1);
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// XPUserCardItemCollectionViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/24.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "XPUserCardItemModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPUserCardItemCollectionViewCell : UICollectionViewCell
|
||||
///
|
||||
@property (nonatomic,strong) XPUserCardItemModel *itemModel;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,87 @@
|
||||
//
|
||||
// XPUserCardItemCollectionViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/24.
|
||||
//
|
||||
|
||||
#import "XPUserCardItemCollectionViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor+UserCard.h"
|
||||
|
||||
@interface XPUserCardItemCollectionViewCell ()
|
||||
///显示图片
|
||||
@property (nonatomic,strong) UIButton *logoButton;
|
||||
///标题
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
@end
|
||||
|
||||
@implementation XPUserCardItemCollectionViewCell
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self.contentView addSubview:self.logoButton];
|
||||
[self.contentView addSubview:self.titleLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.logoButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(35, 35));
|
||||
make.centerX.mas_equalTo(self.contentView);
|
||||
make.top.mas_equalTo(self.contentView);
|
||||
}];
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.contentView);
|
||||
make.top.mas_equalTo(self.logoButton.mas_bottom).offset(8);
|
||||
}];
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setItemModel:(XPUserCardItemModel *)itemModel {
|
||||
_itemModel = itemModel;
|
||||
if (_itemModel.title.length > 0) {
|
||||
self.titleLabel.text = _itemModel.title;
|
||||
}
|
||||
|
||||
if (_itemModel.isSelect && _itemModel.selectTitle.length > 0) {
|
||||
self.titleLabel.text = _itemModel.selectTitle;
|
||||
}
|
||||
|
||||
if (_itemModel.imageName) {
|
||||
[self.logoButton setImage:[UIImage imageNamed:_itemModel.imageName] forState:UIControlStateNormal];
|
||||
}
|
||||
if (_itemModel.selectImageName) {
|
||||
[self.logoButton setImage:[UIImage imageNamed:_itemModel.selectImageName] forState:UIControlStateSelected];
|
||||
}
|
||||
self.logoButton.selected = _itemModel.isSelect;
|
||||
}
|
||||
|
||||
|
||||
- (UIButton *)logoButton {
|
||||
if (!_logoButton) {
|
||||
_logoButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
_logoButton.userInteractionEnabled = NO;
|
||||
}
|
||||
return _logoButton;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:10];
|
||||
_titleLabel.textColor = [ThemeColor userSubTitleColor];
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
@end
|
16
xplan-ios/Main/Room/View/UserCard/View/XPUserCardBaseView.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPUserCardBaseView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/25.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPUserCardBaseView : UIView
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
23
xplan-ios/Main/Room/View/UserCard/View/XPUserCardBaseView.m
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// XPUserCardBaseView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/25.
|
||||
//
|
||||
|
||||
#import "XPUserCardBaseView.h"
|
||||
|
||||
@implementation XPUserCardBaseView
|
||||
//- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
|
||||
// for (int i = 0; i < self.subviews.count; i++) {
|
||||
// UIView * subView = [self.subviews objectAtIndex:i];
|
||||
// CGPoint convertPoint = [subView convertPoint:point fromView:self];
|
||||
// if (CGRectContainsPoint(subView.bounds, convertPoint)) {
|
||||
// UIView * view = [subView hitTest:convertPoint withEvent:event];
|
||||
// return view;
|
||||
// }
|
||||
// }
|
||||
// return self;
|
||||
//}
|
||||
|
||||
@end
|
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// XPUserCardViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/24.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
#import "RoomhostDelegate.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPUserCardViewController : MvpViewController
|
||||
- (instancetype)initWithUid:(NSString *)uid delegate:(id<RoomHostDelegate>)delegate;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,797 @@
|
||||
//
|
||||
// XPUserCardViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/24.
|
||||
//
|
||||
|
||||
#import "XPUserCardViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "XPMacro.h"
|
||||
#import "ThemeColor+UserCard.h"
|
||||
#import "IMMessageHelper.h"
|
||||
#import "TTPopup.h"
|
||||
#import "XPHtmlUrl.h"
|
||||
///Model
|
||||
#import "UserInfoModel.h"
|
||||
#import "XPUserCardItemModel.h"
|
||||
#import "RoomInfoModel.h"
|
||||
#import "AttachmentModel.h"
|
||||
#import "XPKickUserModel.h"
|
||||
///View
|
||||
#import "NetImageView.h"
|
||||
#import "XPUserCardItemCollectionViewCell.h"
|
||||
#import "XPUserCardBaseView.h"
|
||||
///P
|
||||
#import "XPUserCardPresenter.h"
|
||||
#import "XPUserCardProtocol.h"
|
||||
///VC
|
||||
#import "XPWebViewController.h"
|
||||
|
||||
|
||||
@interface XPUserCardViewController ()<UICollectionViewDelegate, UICollectionViewDataSource,XPUserCardProtocol>
|
||||
///点击的view
|
||||
@property (nonatomic,strong) XPUserCardBaseView *tapView;
|
||||
///背景
|
||||
@property (nonatomic,strong) UIView *backView;
|
||||
///最外层的容器
|
||||
@property (nonatomic,strong) UIStackView *stackView;
|
||||
///展示用户的信息
|
||||
@property (nonatomic,strong) UIView * userInfoView;
|
||||
///模糊效果
|
||||
@property (strong, nonatomic) UIVisualEffectView *effectView;
|
||||
///头像背景
|
||||
@property (nonatomic,strong) NetImageView *backImageView;
|
||||
///头像
|
||||
@property (nonatomic,strong) NetImageView *avatarImageView;
|
||||
///名字
|
||||
@property (nonatomic,strong) UILabel *nickLabel;
|
||||
///性别
|
||||
@property (nonatomic,strong) UIImageView *sexImageView;
|
||||
///新用户
|
||||
@property (nonatomic,strong) UIImageView *newUserImageView;
|
||||
///官方的
|
||||
@property (nonatomic,strong) UIImageView *officalImageView;
|
||||
///魅力等级 等级 铭牌
|
||||
@property (nonatomic,strong) UIStackView *tagStackView;
|
||||
///美丽等级
|
||||
@property (nonatomic,strong) NetImageView *charmImageView;
|
||||
///等级
|
||||
@property (nonatomic,strong) NetImageView *experImageView;
|
||||
///铭牌的容器
|
||||
@property (nonatomic,strong) UIView * namePlateView;
|
||||
///铭牌图片
|
||||
@property (nonatomic,strong) NetImageView *nameplateImageView;
|
||||
///铭牌文字
|
||||
@property (nonatomic,strong) UILabel *nameplateLabel;
|
||||
///音游ID
|
||||
@property (nonatomic,strong) UILabel *idLabel;
|
||||
///举报
|
||||
@property (nonatomic,strong) UIButton *reportButton;
|
||||
///关闭
|
||||
@property (nonatomic,strong) UIButton *closeButton;
|
||||
///列表
|
||||
@property (nonatomic,strong) UICollectionView *collectionView;
|
||||
///分割线
|
||||
@property (nonatomic,strong) UIView * sepLineView;
|
||||
///操作的容器
|
||||
@property (nonatomic,strong) UIStackView *operaStackView;
|
||||
///开启关闭
|
||||
@property (nonatomic,strong) UIButton *lockMicroButton;
|
||||
///闭麦/开麦
|
||||
@property (nonatomic,strong) UIButton *muteMicroButton;
|
||||
///上/下麦
|
||||
@property (nonatomic,strong) UIButton *upMicroButton;
|
||||
///展示用户的uid
|
||||
@property (nonatomic,copy) NSString *uid;
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSArray<XPUserCardItemModel *> *datasource;
|
||||
///host代理
|
||||
@property (nonatomic,weak) id<RoomHostDelegate>hostDelegate;
|
||||
///目标用户的信息
|
||||
@property (nonatomic,strong) UserInfoModel *targetUserInfo;
|
||||
@end
|
||||
|
||||
@implementation XPUserCardViewController
|
||||
|
||||
- (instancetype)initWithUid:(NSString *)uid delegate:(id<RoomHostDelegate>)delegate {
|
||||
if (self = [super init]) {
|
||||
self.modalPresentationStyle = UIModalPresentationOverFullScreen;
|
||||
self.uid = uid;
|
||||
self.hostDelegate = delegate;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
NSLog(@"控制器消息会");
|
||||
}
|
||||
|
||||
#pragma mark - Life Style
|
||||
- (XPUserCardPresenter *)createPresenter {
|
||||
return [[XPUserCardPresenter alloc] init];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[self initHttp];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
[self initEvent];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.view.backgroundColor = [UIColor clearColor];
|
||||
[self.view addSubview:self.tapView];
|
||||
///设置颜色 stackView 设置背景色 会失败
|
||||
[self.tapView addSubview:self.backView];
|
||||
|
||||
[self.backView addSubview:self.stackView];
|
||||
|
||||
[self.stackView addArrangedSubview:self.userInfoView];
|
||||
[self.stackView addArrangedSubview:self.collectionView];
|
||||
[self.stackView addArrangedSubview:self.sepLineView];
|
||||
[self.stackView addArrangedSubview:self.operaStackView];
|
||||
///用户信息
|
||||
[self.userInfoView addSubview:self.backImageView];
|
||||
[self.userInfoView addSubview:self.effectView];
|
||||
[self.userInfoView addSubview:self.avatarImageView];
|
||||
[self.userInfoView addSubview:self.nickLabel];
|
||||
[self.userInfoView addSubview:self.sexImageView];
|
||||
[self.userInfoView addSubview:self.tagStackView];
|
||||
[self.userInfoView addSubview:self.idLabel];
|
||||
[self.userInfoView addSubview:self.reportButton];
|
||||
[self.userInfoView addSubview:self.closeButton];
|
||||
///用户信息中的标签
|
||||
[self.tagStackView addArrangedSubview:self.newUserImageView];
|
||||
[self.tagStackView addArrangedSubview:self.officalImageView];
|
||||
[self.tagStackView addArrangedSubview:self.experImageView];
|
||||
[self.tagStackView addArrangedSubview:self.charmImageView];
|
||||
[self.tagStackView addArrangedSubview:self.namePlateView];
|
||||
///铭牌
|
||||
[self.namePlateView addSubview:self.nameplateImageView];
|
||||
[self.namePlateView addSubview:self.nameplateLabel];
|
||||
///底部的操作按钮
|
||||
[self.operaStackView addArrangedSubview:self.muteMicroButton];
|
||||
[self.operaStackView addArrangedSubview:self.upMicroButton];
|
||||
[self.operaStackView addArrangedSubview:self.lockMicroButton];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.tapView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.view);
|
||||
}];
|
||||
|
||||
[self.backView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.tapView).inset(45);
|
||||
make.centerY.mas_equalTo(self.tapView);
|
||||
make.bottom.mas_equalTo(self.stackView.mas_bottom);
|
||||
}];
|
||||
|
||||
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(KScreenWidth - 90);
|
||||
make.top.centerX.mas_equalTo(self.backView);
|
||||
}];
|
||||
|
||||
[self.userInfoView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(self.stackView);
|
||||
make.height.mas_equalTo(110);
|
||||
}];
|
||||
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(self.userInfoView);
|
||||
make.height.mas_equalTo(0);
|
||||
}];
|
||||
|
||||
[self.sepLineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(KScreenWidth - 45 * 2 - 10 * 2, 1));
|
||||
}];
|
||||
|
||||
[self.operaStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(self.userInfoView);
|
||||
make.height.mas_equalTo(32);
|
||||
}];
|
||||
///用户信息的子view
|
||||
[self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.userInfoView);
|
||||
}];
|
||||
|
||||
[self.effectView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.userInfoView);
|
||||
}];
|
||||
|
||||
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(50, 50));
|
||||
make.left.mas_equalTo(self.userInfoView).offset(15);
|
||||
make.top.mas_equalTo(self.userInfoView).offset(30);
|
||||
}];
|
||||
|
||||
[self.nickLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.avatarImageView.mas_right).offset(5);
|
||||
make.top.mas_equalTo(self.avatarImageView);
|
||||
}];
|
||||
|
||||
[self.sexImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(14, 14));
|
||||
make.left.mas_equalTo(self.nickLabel.mas_right).offset(4);
|
||||
make.centerY.mas_equalTo(self.nickLabel);
|
||||
}];
|
||||
|
||||
[self.tagStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.nickLabel);
|
||||
make.top.mas_equalTo(self.nickLabel.mas_bottom).offset(3);
|
||||
make.height.mas_equalTo(20);
|
||||
}];
|
||||
|
||||
[self.idLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.nickLabel);
|
||||
make.top.mas_equalTo(self.tagStackView.mas_bottom).offset(3);
|
||||
}];
|
||||
|
||||
[self.closeButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(22, 22));
|
||||
make.top.mas_equalTo(self.userInfoView).offset(5);
|
||||
make.right.mas_equalTo(self.userInfoView).offset(-6);
|
||||
}];
|
||||
|
||||
[self.reportButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.closeButton);
|
||||
make.right.mas_equalTo(self.closeButton.mas_left).offset(-5);
|
||||
}];
|
||||
|
||||
[self.experImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(20);
|
||||
}];
|
||||
|
||||
[self.charmImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(20);
|
||||
}];
|
||||
|
||||
[self.newUserImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(20);
|
||||
}];
|
||||
|
||||
[self.officalImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(20);
|
||||
}];
|
||||
|
||||
[self.namePlateView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(20);
|
||||
make.width.mas_equalTo(self.nameplateImageView.mas_width);
|
||||
}];
|
||||
|
||||
[self.nameplateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(20);
|
||||
make.width.mas_equalTo(60);
|
||||
make.left.top.mas_equalTo(self.namePlateView);
|
||||
}];
|
||||
|
||||
[self.nameplateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.nameplateImageView);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)initEvent {
|
||||
// UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(disMisssVc:)];
|
||||
// [self.tapView addGestureRecognizer:tap];
|
||||
|
||||
// UITapGestureRecognizer * userInfoTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(gotoUserInfoVC:)];
|
||||
// [self.userInfoView addGestureRecognizer:userInfoTap];
|
||||
}
|
||||
|
||||
- (void)initHttp {
|
||||
[self.presenter getUserInfo:self.uid];
|
||||
NSString * roomId = [NSString stringWithFormat:@"%ld", [self.hostDelegate getRoomInfo].roomId];
|
||||
[self.presenter getFunctionItems:self.uid roomid:roomId];
|
||||
}
|
||||
|
||||
- (void)updateCollectionHeight:(NSArray *)array {
|
||||
if (array.count > 0) {
|
||||
CGFloat collectionHeight = 16 + 10;
|
||||
NSInteger page = array.count / 4;
|
||||
if (page > 0) {
|
||||
if (array.count % 4 ==0) {
|
||||
collectionHeight += (page * 55 + (page-1) * 16);
|
||||
} else {
|
||||
collectionHeight += ((page + 1) * 55 + page * 16);
|
||||
}
|
||||
} else {
|
||||
collectionHeight += 55;
|
||||
}
|
||||
[self.collectionView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(collectionHeight);
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
///拉黑/踢出房间 发送自定义消息
|
||||
- (void)sendCustomMessageKickOrBlackUser:(BOOL)isKick {
|
||||
UserInfoModel * userInfo = [self.hostDelegate getUserInfo];
|
||||
XPKickUserModel *notifyModel = [[XPKickUserModel alloc] init];
|
||||
notifyModel.handleNick = userInfo.nick;
|
||||
notifyModel.handleUid = userInfo.uid;
|
||||
notifyModel.targetUid = self.uid.integerValue;
|
||||
notifyModel.targetNick = self.targetUserInfo.nick;
|
||||
notifyModel.uid = self.uid.integerValue;
|
||||
AttachmentModel *attachment = [[AttachmentModel alloc] init];
|
||||
attachment.first = CustomMessageType_Kick_User;
|
||||
if (isKick) {
|
||||
attachment.second = Custom_Message_Sub_Kick_BeKicked;
|
||||
} else {
|
||||
attachment.second = Custom_Message_Sub_Kick_BlackList;
|
||||
}
|
||||
attachment.data = [notifyModel model2dictionary];
|
||||
NSString * sessionId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId];
|
||||
[IMMessageHelper sendCustomMessage:attachment sessionId:sessionId type:NIMSessionTypeChatroom userInfo:userInfo];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - XPUserCardProtocol
|
||||
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo {
|
||||
self.targetUserInfo = userInfo;
|
||||
self.avatarImageView.imageUrl = userInfo.avatar;
|
||||
self.backImageView.imageUrl = userInfo.avatar;
|
||||
NSString * nick = userInfo.nick;
|
||||
if (nick.length > 10) {
|
||||
nick = [NSString stringWithFormat:@"%@…", [nick substringToIndex:10]];
|
||||
}
|
||||
self.nickLabel.text = nick.length > 0 ? nick : @"";
|
||||
self.sexImageView.image = userInfo.gender == GenderType_Female ? [UIImage imageNamed:@"common_female"] : [UIImage imageNamed:@"common_male"];
|
||||
self.officalImageView.hidden = userInfo.defUser != UserLevelType_Offical;
|
||||
self.newUserImageView.hidden = !userInfo.newUser;
|
||||
if (userInfo.userLevelVo.experUrl) {
|
||||
self.experImageView.imageUrl = userInfo.userLevelVo.experUrl;
|
||||
@kWeakify(self);
|
||||
[self.experImageView loadImage:[UIImageConstant defaultAvatarPlaceholder] completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) {
|
||||
@kStrongify(self);
|
||||
CGFloat kscale = (CGFloat)image.size.width / (CGFloat)image.size.height;
|
||||
[self.experImageView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(20 * kscale);
|
||||
}];
|
||||
}];
|
||||
}
|
||||
self.experImageView.hidden = userInfo.userLevelVo.experUrl.length <= 0;
|
||||
|
||||
if (userInfo.userLevelVo.charmUrl) {
|
||||
self.charmImageView.imageUrl = userInfo.userLevelVo.charmUrl;
|
||||
@kWeakify(self);
|
||||
[self.charmImageView loadImage:[UIImageConstant defaultAvatarPlaceholder] completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) {
|
||||
@kStrongify(self);
|
||||
CGFloat kscale = (CGFloat)image.size.width / (CGFloat)image.size.height;
|
||||
[self.charmImageView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(20 * kscale);
|
||||
}];
|
||||
}];
|
||||
}
|
||||
self.charmImageView.hidden = userInfo.userLevelVo.charmUrl.length <= 0;
|
||||
|
||||
if (userInfo.nameplateWord.length>0 && userInfo.nameplatePic.length>0) {
|
||||
self.nameplateImageView.imageUrl = userInfo.nameplatePic;
|
||||
self.nameplateLabel.text = userInfo.nameplateWord;
|
||||
@kWeakify(self);
|
||||
[self.nameplateImageView loadImage:[UIImageConstant defaultAvatarPlaceholder] completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) {
|
||||
@kStrongify(self);
|
||||
CGFloat kscale = (CGFloat)image.size.width / (CGFloat)image.size.height;
|
||||
[self.nameplateImageView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(20 * kscale);
|
||||
}];
|
||||
}];
|
||||
self.namePlateView.hidden = NO;
|
||||
} else {
|
||||
self.namePlateView.hidden = YES;
|
||||
}
|
||||
self.idLabel.text = [NSString stringWithFormat:@"音游号:%ld", userInfo.erbanNo];
|
||||
}
|
||||
|
||||
- (void)onGetFunctionArraySccess:(NSArray<XPUserCardItemModel *> *)array {
|
||||
self.datasource = array;
|
||||
[self.collectionView reloadData];
|
||||
[self updateCollectionHeight:self.datasource];
|
||||
}
|
||||
|
||||
- (void)attentionUserSuccess:(XPUserCardItemModel *)item {
|
||||
///其实这个遍历 有没有都行 只是为了预防 在vc中修改了数据源中的item 还是判断一下吧
|
||||
[self.datasource enumerateObjectsUsingBlock:^(XPUserCardItemModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if (item.type == obj.type) {
|
||||
obj.isSelect = item.isSelect;
|
||||
*stop = YES;
|
||||
}
|
||||
}];
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
|
||||
- (void)makeKickUserFinish:(NSError *)error {
|
||||
if (error == nil && self.targetUserInfo) {
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
[self sendCustomMessageKickOrBlackUser:YES];
|
||||
} else if (error.code == 404) {
|
||||
[self showErrorToast:@"用户不在房间内"];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)markUserManagerFinish:(XPUserCardItemModel *)item error:(NSError *)error {
|
||||
if (error == nil) {
|
||||
[self.datasource enumerateObjectsUsingBlock:^(XPUserCardItemModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if (item.type == obj.type) {
|
||||
obj.isSelect = item.isSelect;
|
||||
*stop = YES;
|
||||
}
|
||||
}];
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)makeUserBlackFinish:(NSError *)error {
|
||||
if (error == nil && self.targetUserInfo) {
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
[self sendCustomMessageKickOrBlackUser:NO];
|
||||
} else if (error.code == 417) {
|
||||
[self showErrorToast:@"用户已经被拉黑了"];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDelegate
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
return self.datasource.count;
|
||||
}
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[collectionView deselectItemAtIndexPath:indexPath animated:YES];
|
||||
if (self.datasource.count > 0) {
|
||||
XPUserCardItemModel * model = [self.datasource objectAtIndex:indexPath.item];
|
||||
NSString * roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId];
|
||||
switch (model.type) {
|
||||
case UserCardItemType_Chat:
|
||||
///TODO : 去私聊
|
||||
break;
|
||||
case UserCardItemType_Gift:
|
||||
///TODO : 去送礼物
|
||||
break;
|
||||
case UserCardItemType_Attention:
|
||||
[self.presenter attentionUser:self.uid status:!model.isSelect];
|
||||
break;
|
||||
case UserCardItemType_KickOut:
|
||||
{
|
||||
NSString *message = [NSString stringWithFormat:@"是否需要将%@踢出房间?",self.targetUserInfo.nick];
|
||||
TTAlertConfig *config = [[TTAlertConfig alloc] init];
|
||||
config.title = @"操作提醒";
|
||||
config.message = message;
|
||||
[TTPopup alertWithConfig:config confirmHandler:^{
|
||||
[self.presenter makeKickUser:self.uid roomId:roomId];
|
||||
} cancelHandler:^{
|
||||
}];
|
||||
}
|
||||
break;
|
||||
case UserCardItemType_Black:
|
||||
{
|
||||
NSString *title = [NSString stringWithFormat:@"你正在拉黑%@",self.targetUserInfo.nick];
|
||||
TTAlertConfig *config = [[TTAlertConfig alloc] init];
|
||||
config.title = title;
|
||||
config.message = @"拉黑后他将无法加入此房间";
|
||||
[TTPopup alertWithConfig:config confirmHandler:^{
|
||||
[self.presenter makeUserBlack:self.uid roomId:roomId];
|
||||
} cancelHandler:^{
|
||||
}];
|
||||
}
|
||||
break;
|
||||
case UserCardItemType_Manager:
|
||||
[self.presenter makeUserManager:self.uid roomId:roomId enable:!model.isSelect];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDataSource
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
XPUserCardItemCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPUserCardItemCollectionViewCell class]) forIndexPath:indexPath];
|
||||
cell.itemModel = [self.datasource objectAtIndex:indexPath.item];
|
||||
return cell;
|
||||
}
|
||||
|
||||
#pragma mark - Event Response
|
||||
- (void)muteMicroButtonAction:(UIButton *)sender {
|
||||
|
||||
}
|
||||
|
||||
- (void)upMicroButtonAction:(UIButton *)sender {
|
||||
|
||||
}
|
||||
|
||||
- (void)lockMicroButtonAction:(UIButton *)sender {
|
||||
NSLog(@"锁麦");
|
||||
}
|
||||
|
||||
- (void)reportButtonAction:(UIButton *)sender {
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
XPWebViewController *vc = [[XPWebViewController alloc]init];
|
||||
NSString *urlstr = [NSString stringWithFormat:@"%@?reportUid=%@&source=USERCARD",URLWithType(kReportRoomURL),self.uid];
|
||||
vc.url = urlstr;
|
||||
[(UINavigationController *)self.presentingViewController pushViewController:vc animated:YES];
|
||||
}
|
||||
|
||||
- (void)closeButtonAction:(UIButton *)sender {
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
- (void)disMisssVc:(UITapGestureRecognizer *)tap {
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
- (void)gotoUserInfoVC:(UITapGestureRecognizer *)tap {
|
||||
NSLog(@"点击了私聊");
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (XPUserCardBaseView *)tapView {
|
||||
if (!_tapView) {
|
||||
_tapView = [[XPUserCardBaseView alloc] init];
|
||||
_tapView.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
return _tapView;
|
||||
}
|
||||
|
||||
|
||||
- (UIView *)backView {
|
||||
if (!_backView) {
|
||||
_backView = [[UIView alloc] init];
|
||||
_backView.backgroundColor = [UIColor whiteColor];
|
||||
_backView.layer.masksToBounds = YES;
|
||||
_backView.layer.cornerRadius = 12;
|
||||
}
|
||||
return _backView;
|
||||
}
|
||||
|
||||
- (UIStackView *)stackView {
|
||||
if (!_stackView) {
|
||||
_stackView = [[UIStackView alloc] init];
|
||||
_stackView.axis = UILayoutConstraintAxisVertical;
|
||||
_stackView.distribution = UIStackViewDistributionFill;
|
||||
_stackView.alignment = UIStackViewAlignmentCenter;
|
||||
_stackView.spacing = 0;
|
||||
}
|
||||
return _stackView;
|
||||
}
|
||||
|
||||
- (UIView *)userInfoView {
|
||||
if (!_userInfoView) {
|
||||
_userInfoView = [[UIView alloc] init];
|
||||
_userInfoView.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
return _userInfoView;
|
||||
}
|
||||
|
||||
- (UIVisualEffectView *)effectView {
|
||||
if (!_effectView) {
|
||||
UIBlurEffect *effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark];
|
||||
_effectView = [[UIVisualEffectView alloc]initWithEffect:effect];
|
||||
}
|
||||
return _effectView;
|
||||
}
|
||||
|
||||
- (NetImageView *)backImageView {
|
||||
if (!_backImageView) {
|
||||
_backImageView = [[NetImageView alloc] init];
|
||||
_backImageView.userInteractionEnabled = YES;
|
||||
_backImageView.layer.masksToBounds = YES;
|
||||
_backImageView.layer.cornerRadius = 25;
|
||||
_backImageView.imageType = ImageTypeUserIcon;
|
||||
_backImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_backImageView.image = [UIImageConstant defaultAvatarPlaceholder];
|
||||
}
|
||||
return _backImageView;
|
||||
}
|
||||
|
||||
- (UIButton *)reportButton {
|
||||
if (!_reportButton) {
|
||||
_reportButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_reportButton setTitle:@"举报" forState:UIControlStateNormal];
|
||||
[_reportButton setTitleColor:[ThemeColor mainTextColor] forState:UIControlStateNormal];
|
||||
_reportButton.titleLabel.font = [UIFont systemFontOfSize:12];
|
||||
[_reportButton addTarget:self action:@selector(reportButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _reportButton;
|
||||
}
|
||||
|
||||
- (UIButton *)closeButton {
|
||||
if (!_closeButton) {
|
||||
_closeButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_closeButton setImage:[UIImage imageNamed:@"usercard_close"] forState:UIControlStateNormal];
|
||||
[_closeButton setImage:[UIImage imageNamed:@"usercard_close"] forState:UIControlStateSelected];
|
||||
[_closeButton addTarget:self action:@selector(closeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _closeButton;
|
||||
}
|
||||
|
||||
- (NetImageView *)avatarImageView {
|
||||
if (!_avatarImageView) {
|
||||
_avatarImageView = [[NetImageView alloc] init];
|
||||
_avatarImageView.userInteractionEnabled = YES;
|
||||
_avatarImageView.layer.masksToBounds = YES;
|
||||
_avatarImageView.layer.cornerRadius = 25;
|
||||
_avatarImageView.imageType = ImageTypeUserIcon;
|
||||
_avatarImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_avatarImageView.image = [UIImageConstant defaultAvatarPlaceholder];
|
||||
}
|
||||
return _avatarImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)nickLabel {
|
||||
if (!_nickLabel) {
|
||||
_nickLabel = [[UILabel alloc] init];
|
||||
_nickLabel.font = [UIFont systemFontOfSize:15];
|
||||
_nickLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _nickLabel;
|
||||
}
|
||||
|
||||
- (UIImageView *)sexImageView {
|
||||
if (!_sexImageView) {
|
||||
_sexImageView = [[UIImageView alloc] init];
|
||||
_sexImageView.userInteractionEnabled = YES;
|
||||
}
|
||||
return _sexImageView;
|
||||
}
|
||||
|
||||
- (UIStackView *)tagStackView {
|
||||
if (!_tagStackView) {
|
||||
_tagStackView = [[UIStackView alloc] init];
|
||||
_tagStackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_tagStackView.distribution = UIStackViewDistributionFill;
|
||||
_tagStackView.alignment = UIStackViewAlignmentCenter;
|
||||
_tagStackView.spacing = 2;
|
||||
}
|
||||
return _tagStackView;
|
||||
}
|
||||
- (NetImageView *)experImageView {
|
||||
if (!_experImageView) {
|
||||
_experImageView = [[NetImageView alloc] init];
|
||||
_experImageView.userInteractionEnabled = YES;
|
||||
_experImageView.hidden = YES;
|
||||
}
|
||||
return _experImageView;
|
||||
}
|
||||
|
||||
- (NetImageView *)charmImageView {
|
||||
if (!_charmImageView) {
|
||||
_charmImageView = [[NetImageView alloc] init];
|
||||
_charmImageView.userInteractionEnabled = YES;
|
||||
_charmImageView.hidden = YES;
|
||||
}
|
||||
return _charmImageView;
|
||||
}
|
||||
|
||||
- (UIView *)namePlateView {
|
||||
if (!_namePlateView) {
|
||||
_namePlateView = [[UIView alloc] init];
|
||||
_namePlateView.backgroundColor = [UIColor clearColor];
|
||||
_namePlateView.hidden = YES;
|
||||
}
|
||||
return _namePlateView;
|
||||
}
|
||||
|
||||
- (NetImageView *)nameplateImageView {
|
||||
if (!_nameplateImageView) {
|
||||
_nameplateImageView = [[NetImageView alloc] init];
|
||||
_nameplateImageView.userInteractionEnabled = YES;
|
||||
}
|
||||
return _nameplateImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)nameplateLabel {
|
||||
if (!_nameplateLabel) {
|
||||
_nameplateLabel = [[UILabel alloc] init];
|
||||
_nameplateLabel.font = [UIFont systemFontOfSize:12];
|
||||
_nameplateLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_nameplateLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _nameplateLabel;
|
||||
}
|
||||
|
||||
- (UIImageView *)newUserImageView {
|
||||
if (!_newUserImageView) {
|
||||
_newUserImageView = [[UIImageView alloc] init];
|
||||
_newUserImageView.userInteractionEnabled = YES;
|
||||
_newUserImageView.image = [UIImage imageNamed:@"common_new_user"];
|
||||
_newUserImageView.hidden = YES;
|
||||
}
|
||||
return _newUserImageView;
|
||||
}
|
||||
|
||||
- (UIImageView *)officalImageView {
|
||||
if (!_officalImageView) {
|
||||
_officalImageView = [[UIImageView alloc] init];
|
||||
_officalImageView.userInteractionEnabled = YES;
|
||||
_officalImageView.image = [UIImage imageNamed:@"common_offical"];
|
||||
_officalImageView.hidden = YES;
|
||||
}
|
||||
return _officalImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)idLabel {
|
||||
if (!_idLabel) {
|
||||
_idLabel = [[UILabel alloc] init];
|
||||
_idLabel.font = [UIFont systemFontOfSize:10];
|
||||
_idLabel.textColor = [ThemeColor textThirdColor];
|
||||
}
|
||||
return _idLabel;
|
||||
}
|
||||
|
||||
- (UICollectionView *)collectionView{
|
||||
if (!_collectionView) {
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.itemSize = CGSizeMake((KScreenWidth - 45 * 2)/ 4, 55);
|
||||
layout.minimumLineSpacing = 16;
|
||||
layout.minimumInteritemSpacing = 0;
|
||||
layout.sectionInset = UIEdgeInsetsMake(16, 0, 10, 0);
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||
_collectionView.dataSource = self;
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.backgroundColor = [UIColor clearColor];
|
||||
[_collectionView registerClass:[XPUserCardItemCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPUserCardItemCollectionViewCell class])];
|
||||
}
|
||||
return _collectionView;
|
||||
}
|
||||
|
||||
- (UIView *)sepLineView {
|
||||
if (!_sepLineView) {
|
||||
_sepLineView = [[UIView alloc] init];
|
||||
_sepLineView.backgroundColor = [ThemeColor userDividerColor];
|
||||
}
|
||||
return _sepLineView;
|
||||
}
|
||||
|
||||
- (UIStackView *)operaStackView {
|
||||
if (!_operaStackView) {
|
||||
_operaStackView = [[UIStackView alloc] init];
|
||||
_operaStackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_operaStackView.distribution = UIStackViewDistributionFillEqually;
|
||||
_operaStackView.alignment = UIStackViewAlignmentFill;
|
||||
_operaStackView.spacing = 0;
|
||||
}
|
||||
return _operaStackView;
|
||||
}
|
||||
|
||||
- (UIButton *)muteMicroButton {
|
||||
if (!_muteMicroButton) {
|
||||
_muteMicroButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_muteMicroButton setTitle:@"闭麦" forState:UIControlStateNormal];
|
||||
[_muteMicroButton setTitle:@"开麦" forState:UIControlStateSelected];
|
||||
[_muteMicroButton setTitleColor:[ThemeColor userMicroTitleColor] forState:UIControlStateNormal];
|
||||
_muteMicroButton.titleLabel.font = [UIFont systemFontOfSize:15];
|
||||
[_muteMicroButton addTarget:self action:@selector(muteMicroButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _muteMicroButton;
|
||||
}
|
||||
|
||||
- (UIButton *)upMicroButton {
|
||||
if (!_upMicroButton) {
|
||||
_upMicroButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_upMicroButton setTitle:@"抱TA上麦" forState:UIControlStateNormal];
|
||||
[_upMicroButton setTitle:@"下麦旁听" forState:UIControlStateSelected];
|
||||
[_upMicroButton setTitleColor:[ThemeColor userMicroTitleColor] forState:UIControlStateNormal];
|
||||
_upMicroButton.titleLabel.font = [UIFont systemFontOfSize:15];
|
||||
[_upMicroButton addTarget:self action:@selector(upMicroButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _upMicroButton;
|
||||
}
|
||||
|
||||
- (UIButton *)lockMicroButton {
|
||||
if (!_lockMicroButton) {
|
||||
_lockMicroButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_lockMicroButton setTitle:@"锁麦" forState:UIControlStateNormal];
|
||||
[_lockMicroButton setTitle:@"解锁" forState:UIControlStateSelected];
|
||||
[_lockMicroButton setTitleColor:[ThemeColor userMicroTitleColor] forState:UIControlStateNormal];
|
||||
_lockMicroButton.titleLabel.font = [UIFont systemFontOfSize:15];
|
||||
[_lockMicroButton addTarget:self action:@selector(lockMicroButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _lockMicroButton;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|