房间小喇叭
This commit is contained in:
@@ -116,6 +116,8 @@
|
||||
9B0997A127F19D8A00EB8F14 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 9B0997A027F19D8900EB8F14 /* README.md */; };
|
||||
9B0997A327F19DE500EB8F14 /* QGHWDShaders.metal in Sources */ = {isa = PBXBuildFile; fileRef = 9B0997A227F19DE500EB8F14 /* QGHWDShaders.metal */; };
|
||||
9B0E1C5926E77022005D4442 /* BaseNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B0E1C5826E77022005D4442 /* BaseNavigationController.m */; };
|
||||
9B16A34827E17D9B00E13A98 /* XPRoomTrumpetViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B16A34727E17D9B00E13A98 /* XPRoomTrumpetViewController.m */; };
|
||||
9B16A34B27E1915A00E13A98 /* XPTrumpetPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B16A34A27E1915A00E13A98 /* XPTrumpetPresenter.m */; };
|
||||
9B17F71827BD150600440843 /* SVGAParserManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B17F71727BD150600440843 /* SVGAParserManager.m */; };
|
||||
9B208A362779B50100F9E54A /* GiftNobleInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B208A352779B50100F9E54A /* GiftNobleInfoModel.m */; };
|
||||
9B2489BC27C4C056006CFB85 /* XPMineVisitorEmptyTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B2489BB27C4C056006CFB85 /* XPMineVisitorEmptyTableViewCell.m */; };
|
||||
@@ -128,6 +130,7 @@
|
||||
9B33E3CB27D85379003B0E62 /* UploadFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B33E3C927D85379003B0E62 /* UploadFile.m */; };
|
||||
9B33E3CE27D8540C003B0E62 /* XPVoiceCardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B33E3CD27D8540C003B0E62 /* XPVoiceCardViewController.m */; };
|
||||
9B33E3D427D8A1A4003B0E62 /* XPSkillCardPlayerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B33E3D327D8A1A4003B0E62 /* XPSkillCardPlayerManager.m */; };
|
||||
9B5BF8A827E1BED1005DD346 /* Api+RoomTrumpet.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B5BF8A727E1BED1005DD346 /* Api+RoomTrumpet.m */; };
|
||||
9B6B3AAB278C2EA7005551EC /* XPRoomNobleLevelUpView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B6B3AAA278C2EA7005551EC /* XPRoomNobleLevelUpView.m */; };
|
||||
9B73CD05279A9A6A006AF255 /* XPSkillCardSaveModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B73CD04279A9A6A006AF255 /* XPSkillCardSaveModel.m */; };
|
||||
9B73CD09279A9AA2006AF255 /* XPSkillCardUpdatePropModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B73CD08279A9AA2006AF255 /* XPSkillCardUpdatePropModel.m */; };
|
||||
@@ -157,6 +160,7 @@
|
||||
9B92A3692798145000AD168F /* XPSkillCardTypeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B92A3682798145000AD168F /* XPSkillCardTypeModel.m */; };
|
||||
9B92A36D2798179B00AD168F /* XPSkillCardTypeCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B92A36C2798179B00AD168F /* XPSkillCardTypeCollectionViewCell.m */; };
|
||||
9B92A37027981F5B00AD168F /* XPSkillCardEditViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B92A36F27981F5B00AD168F /* XPSkillCardEditViewController.m */; };
|
||||
9B92C02227E0BD040044C5EA /* XPNobleTrumpetModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B92C02127E0BD040044C5EA /* XPNobleTrumpetModel.m */; };
|
||||
9B9EEF4E27C8755C006B0EB3 /* XPSkillCardResourcePropModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B9EEF4D27C8755C006B0EB3 /* XPSkillCardResourcePropModel.m */; };
|
||||
9B9EEF5427C8AFEA006B0EB3 /* XPSkillCardRecordPropModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B9EEF5327C8AFEA006B0EB3 /* XPSkillCardRecordPropModel.m */; };
|
||||
9BA8A47227C5D590000365A3 /* XPVoiceCardCircleLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BA8A47127C5D590000365A3 /* XPVoiceCardCircleLayer.m */; };
|
||||
@@ -765,6 +769,10 @@
|
||||
9B0997A227F19DE500EB8F14 /* QGHWDShaders.metal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.metal; name = QGHWDShaders.metal; path = Pods/QGVAPlayer/iOS/QGVAPlayer/QGVAPlayer/Shaders/QGHWDShaders.metal; sourceTree = SOURCE_ROOT; };
|
||||
9B0E1C5726E77022005D4442 /* BaseNavigationController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BaseNavigationController.h; sourceTree = "<group>"; };
|
||||
9B0E1C5826E77022005D4442 /* BaseNavigationController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BaseNavigationController.m; sourceTree = "<group>"; };
|
||||
9B16A34627E17D9B00E13A98 /* XPRoomTrumpetViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomTrumpetViewController.h; sourceTree = "<group>"; };
|
||||
9B16A34727E17D9B00E13A98 /* XPRoomTrumpetViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomTrumpetViewController.m; sourceTree = "<group>"; };
|
||||
9B16A34927E1915A00E13A98 /* XPTrumpetPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPTrumpetPresenter.h; sourceTree = "<group>"; };
|
||||
9B16A34A27E1915A00E13A98 /* XPTrumpetPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPTrumpetPresenter.m; sourceTree = "<group>"; };
|
||||
9B17F71627BD150600440843 /* SVGAParserManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAParserManager.h; sourceTree = "<group>"; };
|
||||
9B17F71727BD150600440843 /* SVGAParserManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGAParserManager.m; sourceTree = "<group>"; };
|
||||
9B208A342779B50100F9E54A /* GiftNobleInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiftNobleInfoModel.h; sourceTree = "<group>"; };
|
||||
@@ -789,6 +797,9 @@
|
||||
9B33E3CD27D8540C003B0E62 /* XPVoiceCardViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPVoiceCardViewController.m; sourceTree = "<group>"; };
|
||||
9B33E3D227D8A1A4003B0E62 /* XPSkillCardPlayerManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSkillCardPlayerManager.h; sourceTree = "<group>"; };
|
||||
9B33E3D327D8A1A4003B0E62 /* XPSkillCardPlayerManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSkillCardPlayerManager.m; sourceTree = "<group>"; };
|
||||
9B5BF8A627E1BED1005DD346 /* Api+RoomTrumpet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+RoomTrumpet.h"; sourceTree = "<group>"; };
|
||||
9B5BF8A727E1BED1005DD346 /* Api+RoomTrumpet.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Api+RoomTrumpet.m"; sourceTree = "<group>"; };
|
||||
9B5BF8A927E1BF45005DD346 /* XPRoomTrumpetProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomTrumpetProtocol.h; sourceTree = "<group>"; };
|
||||
9B6B3AA9278C2EA7005551EC /* XPRoomNobleLevelUpView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomNobleLevelUpView.h; sourceTree = "<group>"; };
|
||||
9B6B3AAA278C2EA7005551EC /* XPRoomNobleLevelUpView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomNobleLevelUpView.m; sourceTree = "<group>"; };
|
||||
9B73CD03279A9A6A006AF255 /* XPSkillCardSaveModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSkillCardSaveModel.h; sourceTree = "<group>"; };
|
||||
@@ -849,6 +860,8 @@
|
||||
9B92A36C2798179B00AD168F /* XPSkillCardTypeCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSkillCardTypeCollectionViewCell.m; sourceTree = "<group>"; };
|
||||
9B92A36E27981F5B00AD168F /* XPSkillCardEditViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSkillCardEditViewController.h; sourceTree = "<group>"; };
|
||||
9B92A36F27981F5B00AD168F /* XPSkillCardEditViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSkillCardEditViewController.m; sourceTree = "<group>"; };
|
||||
9B92C02027E0BD040044C5EA /* XPNobleTrumpetModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNobleTrumpetModel.h; sourceTree = "<group>"; };
|
||||
9B92C02127E0BD040044C5EA /* XPNobleTrumpetModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNobleTrumpetModel.m; sourceTree = "<group>"; };
|
||||
9B9EEF4C27C8755C006B0EB3 /* XPSkillCardResourcePropModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSkillCardResourcePropModel.h; sourceTree = "<group>"; };
|
||||
9B9EEF4D27C8755C006B0EB3 /* XPSkillCardResourcePropModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSkillCardResourcePropModel.m; sourceTree = "<group>"; };
|
||||
9B9EEF5227C8AFEA006B0EB3 /* XPSkillCardRecordPropModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSkillCardRecordPropModel.h; sourceTree = "<group>"; };
|
||||
@@ -2562,6 +2575,62 @@
|
||||
path = Api;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9B92C01A27E0BAEB0044C5EA /* NobleTrumpet */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9B92C01F27E0BC1E0044C5EA /* Model */,
|
||||
9B92C01E27E0BC160044C5EA /* Api */,
|
||||
9B92C01D27E0BC110044C5EA /* View */,
|
||||
9B92C01C27E0BC080044C5EA /* Presenter */,
|
||||
9B92C01B27E0BB1F0044C5EA /* Protocol */,
|
||||
);
|
||||
path = NobleTrumpet;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9B92C01B27E0BB1F0044C5EA /* Protocol */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9B5BF8A927E1BF45005DD346 /* XPRoomTrumpetProtocol.h */,
|
||||
);
|
||||
path = Protocol;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9B92C01C27E0BC080044C5EA /* Presenter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9B16A34927E1915A00E13A98 /* XPTrumpetPresenter.h */,
|
||||
9B16A34A27E1915A00E13A98 /* XPTrumpetPresenter.m */,
|
||||
);
|
||||
path = Presenter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9B92C01D27E0BC110044C5EA /* View */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9B16A34627E17D9B00E13A98 /* XPRoomTrumpetViewController.h */,
|
||||
9B16A34727E17D9B00E13A98 /* XPRoomTrumpetViewController.m */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9B92C01E27E0BC160044C5EA /* Api */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9B5BF8A627E1BED1005DD346 /* Api+RoomTrumpet.h */,
|
||||
9B5BF8A727E1BED1005DD346 /* Api+RoomTrumpet.m */,
|
||||
);
|
||||
path = Api;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9B92C01F27E0BC1E0044C5EA /* Model */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9B92C02027E0BD040044C5EA /* XPNobleTrumpetModel.h */,
|
||||
9B92C02127E0BD040044C5EA /* XPNobleTrumpetModel.m */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9B9DFDA227DB4F68000F95B3 /* Recovered References */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -3845,6 +3914,7 @@
|
||||
E8AEAED8271413530017FCE0 /* View */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9B92C01A27E0BAEB0044C5EA /* NobleTrumpet */,
|
||||
9B7B605827BB52FD0070BB72 /* AnchorView */,
|
||||
E8412F9A2779BAC2006E1101 /* Setting */,
|
||||
E84150B027747A7400A7F548 /* FirstRecharge */,
|
||||
@@ -4812,6 +4882,7 @@
|
||||
E8C1CD6627D88EF800376F83 /* XPRoomFaceViewController.m in Sources */,
|
||||
E80DE4102775C34E00BE5BCB /* XPFirstRechargeSuccessView.m in Sources */,
|
||||
E8412FB32779E285006E1101 /* Api+RoomSetting.m in Sources */,
|
||||
9B16A34B27E1915A00E13A98 /* XPTrumpetPresenter.m in Sources */,
|
||||
E8A6C29827CF448700AC7442 /* XPHomeCollectRoomTableViewCell.m in Sources */,
|
||||
E8EEB8F226FC2050007C6EBA /* SDPhotoBrowser.m in Sources */,
|
||||
E81C27AB26EF2D920031E639 /* ThirdUserInfo.m in Sources */,
|
||||
@@ -4857,6 +4928,7 @@
|
||||
E8AC722426F47E5E007D6E91 /* XPMineFeedbackViewController.m in Sources */,
|
||||
E87E914E2796678D00A7B3F2 /* XPMineDressEmptyTableViewCell.m in Sources */,
|
||||
9B7D804D27537950003DAC0C /* MessageCell.m in Sources */,
|
||||
9B92C02227E0BD040044C5EA /* XPNobleTrumpetModel.m in Sources */,
|
||||
18F404C927609A4300A6C548 /* MessagePresenter.m in Sources */,
|
||||
9BC9DAEF27E33B3F009EE409 /* XPRoomGiftAnimationParser.m in Sources */,
|
||||
9B2A12DB2783F88800CED41B /* XPNoblePrivilegeCell.m in Sources */,
|
||||
@@ -4930,6 +5002,7 @@
|
||||
9B92A3662798132600AD168F /* XPSkillCardTypeView.m in Sources */,
|
||||
E8EE827D272B9A2300A17217 /* XPRoomSendTextView.m in Sources */,
|
||||
9BD63FAE277EE97A006EB744 /* XPReleaseRadioPresenter.m in Sources */,
|
||||
9B5BF8A827E1BED1005DD346 /* Api+RoomTrumpet.m in Sources */,
|
||||
E8EEB90626FC5772007C6EBA /* XPMineUserInfoEditViewController.m in Sources */,
|
||||
E8B846D626FDE01B00A777FE /* XPMineRechargePresenter.m in Sources */,
|
||||
E8EEB91426FC7786007C6EBA /* XPMineUserInfoNickViewController.m in Sources */,
|
||||
@@ -5061,6 +5134,7 @@
|
||||
9B73CD11279AE99B006AF255 /* XPSkillCardListCell.m in Sources */,
|
||||
E8B846BC26FD7C1200A777FE /* UploadImage.m in Sources */,
|
||||
9BCE6144277D657600CC0358 /* XPReleaseRadioTableViewCell.m in Sources */,
|
||||
9B16A34827E17D9B00E13A98 /* XPRoomTrumpetViewController.m in Sources */,
|
||||
186A534D26FC6ED900D67B2C /* TTActionSheetView.m in Sources */,
|
||||
9B7D8857279C099C00785A25 /* XPSkillCardListPropCell.m in Sources */,
|
||||
E83DB481274649FB00D8CBD1 /* XPGiftBannerUserInfoModel.m in Sources */,
|
||||
|
22
xplan-ios/Assets.xcassets/Room/MoreMenu/room_more_menu_trumpet.imageset/Contents.json
vendored
Normal file
22
xplan-ios/Assets.xcassets/Room/MoreMenu/room_more_menu_trumpet.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_more_menu_trumpet@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_more_menu_trumpet@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
6
xplan-ios/Assets.xcassets/Room/Trumpet/Contents.json
Normal file
6
xplan-ios/Assets.xcassets/Room/Trumpet/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
22
xplan-ios/Assets.xcassets/Room/Trumpet/rooom_trumpet_send.imageset/Contents.json
vendored
Normal file
22
xplan-ios/Assets.xcassets/Room/Trumpet/rooom_trumpet_send.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "rooom_trumpet_send@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "rooom_trumpet_send@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Room/Trumpet/rooom_trumpet_send.imageset/rooom_trumpet_send@2x.png
vendored
Normal file
BIN
xplan-ios/Assets.xcassets/Room/Trumpet/rooom_trumpet_send.imageset/rooom_trumpet_send@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.2 KiB |
BIN
xplan-ios/Assets.xcassets/Room/Trumpet/rooom_trumpet_send.imageset/rooom_trumpet_send@3x.png
vendored
Normal file
BIN
xplan-ios/Assets.xcassets/Room/Trumpet/rooom_trumpet_send.imageset/rooom_trumpet_send@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
@@ -16,6 +16,7 @@ UIKIT_EXTERN NSString * const kTeenagerAlertDatekey;
|
||||
UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
|
||||
UIKIT_EXTERN NSString * const kRoomReleaseRadioNotificationKey;
|
||||
UIKIT_EXTERN NSString * const kVisitorUnReadCountNotificationKey;
|
||||
UIKIT_EXTERN NSString * const kRoomNobleTrumpetNotificationKey;
|
||||
|
||||
typedef NS_ENUM(NSUInteger, KeyType) {
|
||||
KeyType_PasswordEncode,///密码 des 加密的
|
||||
|
@@ -17,6 +17,7 @@ NSString * const kRoomRoomSettingNotificationKey = @"kRoomRoomSettingNotificatio
|
||||
NSString * const kHomeMoreScrollPageKey = @"kHomeMoreScrollPageKey";
|
||||
NSString * const kRoomReleaseRadioNotificationKey = @"kRoomReleaseRadioNotificationKey";
|
||||
NSString * const kVisitorUnReadCountNotificationKey = @"kVisitorUnReadCountNotificationKey";
|
||||
NSString * const kRoomNobleTrumpetNotificationKey = @"kRoomNobleTrumpetNotificationKey";
|
||||
|
||||
///在里面进行判断当前环境是什么
|
||||
NSString * const KeyWithType(KeyType type) {
|
||||
|
@@ -237,6 +237,9 @@ typedef NS_ENUM(NSUInteger, CustomMessageSubNobleVIP) {
|
||||
Custom_Message_Sub_Room_Noble_LevelUp_Suspend = 855,
|
||||
/// 贵族升级全服房间公屏通知消息
|
||||
Custom_Message_Sub_AllRoom_Noble_LevelUp_Suspend = 856,
|
||||
/// 贵族小喇叭房间消息
|
||||
Custom_Message_Sub_Room_Trumpet = 857,
|
||||
|
||||
};
|
||||
|
||||
/// 访客记录
|
||||
|
@@ -54,6 +54,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// @param type 房间类型
|
||||
+ (void)roomRadioGetMsg:(HttpRequestHelperCompletion)completion roomType:(NSString *)type;
|
||||
|
||||
/// 获取房间贵族小喇叭
|
||||
/// @param completion 完成
|
||||
+ (void)getUserVipRoomTrumpet:(HttpRequestHelperCompletion)completion;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -67,4 +67,11 @@
|
||||
+ (void)roomRadioGetMsg:(HttpRequestHelperCompletion)completion roomType:(NSString *)type {
|
||||
[self makeRequest:@"broad/getMsg" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, type, nil];
|
||||
}
|
||||
|
||||
/// 获取房间贵族小喇叭
|
||||
/// @param completion 完成
|
||||
+ (void)getUserVipRoomTrumpet:(HttpRequestHelperCompletion)completion {
|
||||
[self makeRequest:@"vip/getUserVipRoomHorn" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, nil];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -32,6 +32,8 @@ typedef NS_ENUM(NSInteger, RoomMoreMenuType) {
|
||||
RoomMoreMenuType_Room_Dating_Close = 10,
|
||||
///发布广播
|
||||
RoomMoreMenuType_Release_Radio = 11,
|
||||
///房间小喇叭
|
||||
RoomMoreMenuType_Room_trumpet = 12,
|
||||
};
|
||||
|
||||
@interface XPRoomMoreItemModel : NSObject
|
||||
|
@@ -39,6 +39,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// @param type 房间类型
|
||||
- (void)getRoomRadioMessageListWithType:(NSString *)type;
|
||||
|
||||
/// 获取房间贵族小喇叭信息
|
||||
- (void)getRoomgetUserVipRoomTrumpet;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -14,6 +14,7 @@
|
||||
#import "XPRoomMoreItemModel.h"
|
||||
#import "RoomInfoModel.h"
|
||||
#import "XPReleaseRadioModel.h"
|
||||
#import "XPNobleTrumpetModel.h"
|
||||
///P
|
||||
#import "XPMoreMenuProtocol.h"
|
||||
#import "ThemeColor.h"
|
||||
@@ -63,6 +64,12 @@
|
||||
releaseRadio.imageName = @"room_more_menu_release_radio";
|
||||
releaseRadio.type = RoomMoreMenuType_Release_Radio;
|
||||
releaseRadio.titleColor = [ThemeColor roomMoreMenuTextColor];
|
||||
|
||||
XPRoomMoreItemModel * trumpet = [[XPRoomMoreItemModel alloc] init];
|
||||
trumpet.title = @"房间小喇叭";
|
||||
trumpet.imageName = @"room_more_menu_trumpet";
|
||||
trumpet.type = RoomMoreMenuType_Room_trumpet;
|
||||
trumpet.titleColor = [ThemeColor roomMoreMenuTextColor];
|
||||
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
|
||||
@@ -84,9 +91,10 @@
|
||||
[array addObject:giftValue];
|
||||
[array addObject:roomSetting];
|
||||
[array addObject:inviteFriend];
|
||||
}
|
||||
if (isCreator && roomInfo.type != RoomType_Anchor && roomInfo.isPermitRoom != PermitRoomType_Licnese && roomInfo.isPermitRoom != PermitRoomType_YoungerStar) {
|
||||
[array addObject:releaseRadio];
|
||||
if (isCreator && roomInfo.type != RoomType_Anchor && roomInfo.isPermitRoom != PermitRoomType_Licnese && roomInfo.isPermitRoom != PermitRoomType_YoungerStar) {
|
||||
[array addObject:releaseRadio];
|
||||
}
|
||||
[array addObject:trumpet];
|
||||
}
|
||||
}
|
||||
[[self getView] getMoreMenuDataSuccess:array];
|
||||
@@ -150,4 +158,12 @@
|
||||
}] roomType:type];
|
||||
}
|
||||
|
||||
/// 获取房间贵族小喇叭信息
|
||||
- (void)getRoomgetUserVipRoomTrumpet {
|
||||
[Api getUserVipRoomTrumpet:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
XPNobleTrumpetModel *model = [XPNobleTrumpetModel modelWithJSON:data.data];
|
||||
[[self getView] getTrumpetSuccess:model];
|
||||
}]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -9,7 +9,7 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class XPRoomMoreItemModel, RoomInfoModel, XPReleaseRadioModel;
|
||||
@class XPRoomMoreItemModel, RoomInfoModel, XPReleaseRadioModel, XPNobleTrumpetModel;
|
||||
@protocol XPMoreMenuProtocol <NSObject>
|
||||
|
||||
///更多菜单要展示的内容
|
||||
@@ -26,6 +26,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (void)closeRoomDatingSuccess;
|
||||
///获取房间广播信息成功
|
||||
- (void)getReleaseRadioSuccess:(XPReleaseRadioModel *)model;
|
||||
///获取房间贵族喇叭成功
|
||||
- (void)getTrumpetSuccess:(XPNobleTrumpetModel *)model;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -153,6 +153,12 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kRoomReleaseRadioNotificationKey object:model];
|
||||
}];
|
||||
}
|
||||
///获取房间贵族小喇叭
|
||||
- (void)getTrumpetSuccess:(XPNobleTrumpetModel *)model {
|
||||
[self dismissViewControllerAnimated:YES completion:^{
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kRoomNobleTrumpetNotificationKey object:model];
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDelegate And UICollectionViewDatasource
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
@@ -254,6 +260,9 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
||||
{
|
||||
[self.presenter getRoomRadioMessageListWithType:[NSString stringWithFormat:@"%zd", self.roomInfo.type]];
|
||||
}
|
||||
break;
|
||||
case RoomMoreMenuType_Room_trumpet:
|
||||
[self.presenter getRoomgetUserVipRoomTrumpet];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
19
xplan-ios/Main/Room/View/NobleTrumpet/Api/Api+RoomTrumpet.h
Normal file
19
xplan-ios/Main/Room/View/NobleTrumpet/Api/Api+RoomTrumpet.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// Api+RoomTrumpet.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/3/16.
|
||||
//
|
||||
|
||||
#import "Api.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface Api (RoomTrumpet)
|
||||
|
||||
// 发送贵族小喇叭消息
|
||||
+ (void)sendRoomTrumpet:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid content:(NSString *)content;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
17
xplan-ios/Main/Room/View/NobleTrumpet/Api/Api+RoomTrumpet.m
Normal file
17
xplan-ios/Main/Room/View/NobleTrumpet/Api/Api+RoomTrumpet.m
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// Api+RoomTrumpet.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/3/16.
|
||||
//
|
||||
|
||||
#import "Api+RoomTrumpet.h"
|
||||
|
||||
@implementation Api (RoomTrumpet)
|
||||
|
||||
// 发送贵族小喇叭消息
|
||||
+ (void)sendRoomTrumpet:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid content:(NSString *)content {
|
||||
[self makeRequest:@"vip/sendRoomHorn" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, roomUid, content, nil];
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// XPNobleTrumpetModel.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/3/15.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPNobleTrumpetModel : NSObject
|
||||
|
||||
///上次发送的时间
|
||||
@property (nonatomic, assign) long long lastSendTime;
|
||||
///剩余次数
|
||||
@property (nonatomic, assign) NSInteger remainCount;
|
||||
///总数
|
||||
@property (nonatomic, assign) NSInteger totalCount;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// XPNobleTrumpetModel.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/3/15.
|
||||
//
|
||||
|
||||
#import "XPNobleTrumpetModel.h"
|
||||
|
||||
@implementation XPNobleTrumpetModel
|
||||
|
||||
@end
|
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// XPTrumpetPresenter.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/3/16.
|
||||
//
|
||||
|
||||
#import "BaseMvpPresenter.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPTrumpetPresenter : BaseMvpPresenter
|
||||
|
||||
///发送房间小喇叭
|
||||
/// @param roomId 房间ID
|
||||
/// @param message 小喇叭内容
|
||||
- (void)releaseRoomTrumpetWithRoomUid:(NSString *)roomUid message:(NSString *)message;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// XPTrumpetPresenter.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/3/16.
|
||||
//
|
||||
|
||||
#import "XPTrumpetPresenter.h"
|
||||
#import "Api+RoomTrumpet.h"
|
||||
#import "XPRoomTrumpetProtocol.h"
|
||||
|
||||
@implementation XPTrumpetPresenter
|
||||
|
||||
///发送房间小喇叭
|
||||
/// @param roomUid 房间ID
|
||||
/// @param message 小喇叭内容
|
||||
- (void)releaseRoomTrumpetWithRoomUid:(NSString *)roomUid message:(NSString *)message {
|
||||
[Api sendRoomTrumpet:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
[[self getView] releaseRoomTrumpetSuccess];
|
||||
}] roomUid:roomUid content:message];
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// XPRoomTrumpetProtocol.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/3/16.
|
||||
//
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@protocol XPRoomTrumpetProtocol <NSObject>
|
||||
|
||||
///发布房间小喇叭成功
|
||||
- (void)releaseRoomTrumpetSuccess;
|
||||
|
||||
@end
|
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// XPRoomTrumpetViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/3/16.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
#import "RoomHostDelegate.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class XPNobleTrumpetModel;
|
||||
@interface XPRoomTrumpetViewController : MvpViewController
|
||||
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate;
|
||||
|
||||
@property (nonatomic, strong) XPNobleTrumpetModel *model;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,423 @@
|
||||
//
|
||||
// XPRoomTrumpetViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/3/16.
|
||||
//
|
||||
|
||||
#import "XPRoomTrumpetViewController.h"
|
||||
///tool
|
||||
#import <YYText/YYText.h>
|
||||
#import "ThemeColor.h"
|
||||
#import "ThemeColor+NobleCenter.h"
|
||||
#import "XPMacro.h"
|
||||
#import "XCHUDTool.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import "UIImage+Utils.h"
|
||||
///view
|
||||
///P
|
||||
#import "XPTrumpetPresenter.h"
|
||||
#import "XPRoomTrumpetProtocol.h"
|
||||
///model
|
||||
#import "XPNobleTrumpetModel.h"
|
||||
#import "RoomInfoModel.h"
|
||||
|
||||
@interface XPRoomTrumpetViewController ()<YYTextViewDelegate, XPRoomTrumpetProtocol>
|
||||
///host代理
|
||||
@property (nonatomic,weak) id<RoomHostDelegate>hostDelegate;
|
||||
|
||||
///上面点击的view
|
||||
@property (nonatomic,strong) UIView *topTapView;
|
||||
///下面点击的view
|
||||
@property (nonatomic,strong) UIView *bottomTapView;
|
||||
///中间内容的容器
|
||||
@property (nonatomic,strong) UIImageView *backView;
|
||||
///顶部标题
|
||||
@property (nonatomic,strong) UILabel *headLabel;
|
||||
///广播内容标题
|
||||
@property (nonatomic,strong) UILabel *radioTitleLabel;
|
||||
///剩余次数容器
|
||||
@property (nonatomic, strong) UIStackView *releaseNumView;
|
||||
///剩余次数标题
|
||||
@property (nonatomic, strong) UILabel *releaseNumTitle;
|
||||
///剩余次数
|
||||
@property (nonatomic, strong) UILabel *releaseNumLabel;
|
||||
///广播输入框
|
||||
@property (nonatomic,strong) YYTextView *trumpetTextView;
|
||||
///字数计数
|
||||
@property (nonatomic,strong) UILabel *maxCountLabel;
|
||||
///发布按钮
|
||||
@property (nonatomic, strong) UIButton *releaseButton;
|
||||
///发布时间说明(可以发布时显示)
|
||||
@property (nonatomic, strong) UILabel *releaseTimeDescLabel;
|
||||
///发布后倒计时说明容器
|
||||
@property (nonatomic,strong) UIView *countDownStackView;
|
||||
///倒计时
|
||||
@property (nonatomic,strong) UILabel *countDownLabel;
|
||||
///倒计时说明
|
||||
@property (nonatomic, strong) UILabel *countDownDescLabel;
|
||||
|
||||
@property (strong, nonatomic) dispatch_source_t timer;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPRoomTrumpetViewController
|
||||
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate {
|
||||
if (self = [super init]) {
|
||||
self.hostDelegate = delegate;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (XPTrumpetPresenter *)createPresenter {
|
||||
return [[XPTrumpetPresenter alloc] init];
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
if (self.timer != nil) {
|
||||
dispatch_source_cancel(self.timer);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
|
||||
#pragma mark - XPRoomTrumpetProtocol
|
||||
///发布小喇叭成功
|
||||
- (void)releaseRoomTrumpetSuccess {
|
||||
[XCHUDTool showSuccessWithMessage:@"发布成功"];
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
|
||||
[self.view endEditing:YES];
|
||||
}
|
||||
|
||||
- (void)setModel:(XPNobleTrumpetModel *)model {
|
||||
_model = model;
|
||||
self.releaseNumLabel.text = [NSString stringWithFormat:@"%zd/%zd",self.model.remainCount, self.model.totalCount];
|
||||
// self.releaseTimeDescLabel.text = [NSString stringWithFormat:@"发布后,%zd分钟内不可再发布广播", self.model.minutes];
|
||||
// self.trumpetTextView.placeholderText = [NSString stringWithFormat:@"输入内容不能少于%zd个字,请文明发言哦~", self.model.minWords] ;
|
||||
// self.releaseTimeDescLabel.hidden = self.model.seconds > 0;
|
||||
// self.countDownStackView.hidden = self.model.seconds <= 0;
|
||||
// if (self.model.seconds > 0) {
|
||||
// [self openCountdown:self.model.seconds];
|
||||
// }
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.view.backgroundColor = [UIColor clearColor];
|
||||
[self.view addSubview:self.topTapView];
|
||||
[self.view addSubview:self.backView];
|
||||
[self.view addSubview:self.bottomTapView];
|
||||
|
||||
[self.backView addSubview:self.headLabel];
|
||||
[self.backView addSubview:self.radioTitleLabel];
|
||||
[self.backView addSubview:self.releaseNumView];
|
||||
[self.releaseNumView addArrangedSubview:self.releaseNumTitle];
|
||||
[self.releaseNumView addArrangedSubview:self.releaseNumLabel];
|
||||
|
||||
[self.backView addSubview:self.trumpetTextView];
|
||||
[self.backView addSubview:self.maxCountLabel];
|
||||
[self.backView addSubview:self.releaseButton];
|
||||
[self.backView addSubview:self.releaseTimeDescLabel];
|
||||
[self.backView addSubview:self.countDownStackView];
|
||||
|
||||
[self.countDownStackView addSubview:self.countDownLabel];
|
||||
[self.countDownStackView addSubview:self.countDownDescLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.topTapView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.left.right.mas_equalTo(self.view);
|
||||
make.bottom.mas_equalTo(self.backView.mas_top);
|
||||
}];
|
||||
|
||||
[self.backView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(300);
|
||||
make.height.mas_equalTo(286);
|
||||
make.centerY.centerX.mas_equalTo(self.view);
|
||||
}];
|
||||
|
||||
[self.bottomTapView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(self.backView.mas_bottom);
|
||||
make.bottom.mas_equalTo(self.view);
|
||||
}];
|
||||
|
||||
[self.headLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.backView);
|
||||
make.top.mas_equalTo(self.backView).offset(24);
|
||||
make.height.mas_equalTo(24);
|
||||
}];
|
||||
|
||||
[self.radioTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.headLabel.mas_bottom).offset(16);
|
||||
make.height.mas_equalTo(16);
|
||||
make.left.mas_equalTo(self.backView).mas_offset(16);
|
||||
}];
|
||||
|
||||
[self.releaseNumView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.radioTitleLabel);
|
||||
make.left.mas_equalTo(self.radioTitleLabel.mas_right).mas_offset(4);
|
||||
make.height.mas_equalTo(20);
|
||||
}];
|
||||
|
||||
[self.trumpetTextView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.backView).inset(16);
|
||||
make.top.mas_equalTo(self.radioTitleLabel.mas_bottom).mas_offset(8);
|
||||
make.height.mas_equalTo(82);
|
||||
}];
|
||||
|
||||
[self.maxCountLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.bottom.mas_equalTo(self.trumpetTextView).inset(3);
|
||||
make.height.mas_equalTo(12);
|
||||
}];
|
||||
|
||||
|
||||
[self.releaseButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.trumpetTextView.mas_bottom).mas_offset(32);
|
||||
make.centerX.mas_equalTo(self.backView);
|
||||
make.width.mas_equalTo(160);
|
||||
make.height.mas_equalTo(44);
|
||||
}];
|
||||
|
||||
[self.releaseTimeDescLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.backView);
|
||||
make.top.mas_equalTo(self.releaseButton.mas_bottom).mas_offset(10);
|
||||
make.height.mas_equalTo(14);
|
||||
}];
|
||||
|
||||
[self.countDownStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(15);
|
||||
make.centerX.mas_equalTo(self.backView);
|
||||
make.top.mas_equalTo(self.releaseButton.mas_bottom).mas_offset(10);
|
||||
}];
|
||||
[self.countDownLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.top.bottom.mas_equalTo(self.countDownStackView);
|
||||
make.right.mas_equalTo(self.countDownDescLabel.mas_left);
|
||||
}];
|
||||
[self.countDownDescLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.right.bottom.mas_equalTo(self.countDownStackView);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)openCountdown:(NSInteger)countDown{
|
||||
__block NSInteger time = countDown; //倒计时时间
|
||||
if (_timer != nil) {
|
||||
dispatch_source_cancel(_timer);
|
||||
}
|
||||
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
|
||||
_timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, queue);
|
||||
dispatch_source_set_timer(_timer,dispatch_walltime(NULL, 0),1.0*NSEC_PER_SEC, 0); //每秒执行
|
||||
dispatch_source_set_event_handler(_timer, ^{
|
||||
if(time <= 0){ //倒计时结束,关闭
|
||||
@kWeakify(self);
|
||||
dispatch_source_cancel(self.timer);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
@kStrongify(self);
|
||||
self.releaseTimeDescLabel.hidden = NO;
|
||||
self.countDownStackView.hidden = YES;
|
||||
if (self.model.remainCount > 0 && self.trumpetTextView.text.length >= 1) {
|
||||
self.releaseButton.enabled = YES;
|
||||
}
|
||||
});
|
||||
}else{
|
||||
NSInteger seconds = time;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
//设置按钮显示读秒效果
|
||||
self.countDownLabel.text = [NSString stringWithFormat:@"%zds", seconds];
|
||||
});
|
||||
time--;
|
||||
}
|
||||
});
|
||||
dispatch_resume(_timer);
|
||||
}
|
||||
|
||||
- (void)onReleaseButtonClick:(UIButton *)button {
|
||||
if (self.trumpetTextView.text.length < 1) {
|
||||
return;
|
||||
}
|
||||
[self.presenter releaseRoomTrumpetWithRoomUid:@(self.hostDelegate.getRoomInfo.uid).stringValue message:self.trumpetTextView.text];
|
||||
}
|
||||
|
||||
#pragma mark - Event Response
|
||||
- (void)dismissTapRecognizer:(UITapGestureRecognizer *)tap {
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
#pragma mark - YYTextViewDelegate
|
||||
- (void)textViewDidChange:(YYTextView *)textView {
|
||||
NSInteger maxLength = 20;
|
||||
NSInteger minLength = 1;
|
||||
if (textView.text.length > maxLength) {
|
||||
textView.text = [textView.text substringToIndex:maxLength];
|
||||
}
|
||||
self.maxCountLabel.text = [NSString stringWithFormat:@"%zd/%ld", textView.text.length, maxLength];
|
||||
if (textView.text.length >= minLength) {
|
||||
if (self.model.lastSendTime > 0 && self.countDownStackView.hidden) {
|
||||
// self.releaseButton.enabled = YES;
|
||||
}
|
||||
} else {
|
||||
// self.releaseButton.enabled = NO;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (UIView *)topTapView {
|
||||
if (!_topTapView) {
|
||||
_topTapView = [[UIView alloc] init];
|
||||
_topTapView.backgroundColor = [UIColor clearColor];
|
||||
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissTapRecognizer:)];
|
||||
[_topTapView addGestureRecognizer:tap];
|
||||
}
|
||||
return _topTapView;
|
||||
}
|
||||
- (UIView *)bottomTapView {
|
||||
if (!_bottomTapView) {
|
||||
_bottomTapView = [[UIView alloc] init];
|
||||
_bottomTapView.backgroundColor = [UIColor clearColor];
|
||||
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissTapRecognizer:)];
|
||||
[_bottomTapView addGestureRecognizer:tap];
|
||||
}
|
||||
return _bottomTapView;
|
||||
}
|
||||
- (UIImageView *)backView {
|
||||
if (!_backView) {
|
||||
_backView = [[UIImageView alloc] init];
|
||||
_backView.userInteractionEnabled = YES;
|
||||
_backView.image = [UIImage imageNamed:@"noble_time_popBg"];
|
||||
}
|
||||
return _backView;
|
||||
}
|
||||
|
||||
- (UILabel *)headLabel {
|
||||
if (!_headLabel) {
|
||||
_headLabel = [[UILabel alloc] init];
|
||||
_headLabel.text = @"房间小喇叭";
|
||||
_headLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium];
|
||||
_headLabel.textColor = [ThemeColor hightNobleLightTextColor];
|
||||
}
|
||||
return _headLabel;
|
||||
}
|
||||
- (UILabel *)radioTitleLabel {
|
||||
if (!_radioTitleLabel) {
|
||||
UILabel *label = [[UILabel alloc] init];
|
||||
label.text = @"消息内容";
|
||||
label.font = [UIFont systemFontOfSize:14];
|
||||
label.textColor = [ThemeColor hightNobleLightTextColor];
|
||||
_radioTitleLabel = label;
|
||||
}
|
||||
return _radioTitleLabel;
|
||||
}
|
||||
- (UIStackView *)releaseNumView {
|
||||
if (!_releaseNumView) {
|
||||
_releaseNumView = [[UIStackView alloc] init];
|
||||
_releaseNumView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_releaseNumView.distribution = UIStackViewDistributionFill;
|
||||
_releaseNumView.alignment = UIStackViewAlignmentCenter;
|
||||
_releaseNumView.spacing = 2;
|
||||
}
|
||||
return _releaseNumView;
|
||||
}
|
||||
- (UILabel *)releaseNumTitle {
|
||||
if (!_releaseNumTitle) {
|
||||
UILabel *label = [[UILabel alloc] init];
|
||||
label.text = @"剩余次数";
|
||||
label.font = [UIFont systemFontOfSize:10];
|
||||
label.textColor = [ThemeColor normalNobleTextColor];
|
||||
_releaseNumTitle = label;
|
||||
}
|
||||
return _releaseNumTitle;
|
||||
}
|
||||
- (UILabel *)releaseNumLabel {
|
||||
if (!_releaseNumLabel) {
|
||||
UILabel *label = [[UILabel alloc] init];
|
||||
label.text = @"100/100";
|
||||
label.font = [UIFont systemFontOfSize:10];
|
||||
label.textColor = [ThemeColor normalNobleTextColor];
|
||||
_releaseNumLabel = label;
|
||||
}
|
||||
return _releaseNumLabel;
|
||||
}
|
||||
|
||||
- (YYTextView *)trumpetTextView {
|
||||
if (!_trumpetTextView) {
|
||||
_trumpetTextView = [[YYTextView alloc] init];
|
||||
_trumpetTextView.backgroundColor = UIColorFromRGB(0x2C200E);
|
||||
_trumpetTextView.layer.cornerRadius = 8;
|
||||
_trumpetTextView.layer.masksToBounds = YES;
|
||||
_trumpetTextView.placeholderText = @"输入内容最多20个字哦~";
|
||||
_trumpetTextView.placeholderTextColor = [ThemeColor noContainDescTextColor];
|
||||
_trumpetTextView.placeholderFont = [UIFont systemFontOfSize:12];
|
||||
_trumpetTextView.font = [UIFont systemFontOfSize:12];
|
||||
_trumpetTextView.textColor = [ThemeColor hightNobleLightTextColor];
|
||||
_trumpetTextView.delegate = self;
|
||||
}
|
||||
return _trumpetTextView;
|
||||
}
|
||||
|
||||
- (UIButton *)releaseButton {
|
||||
if (!_releaseButton) {
|
||||
_releaseButton = [[UIButton alloc] init];
|
||||
[_releaseButton setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal];
|
||||
[_releaseButton setBackgroundImage:[UIImage imageNamed:@"rooom_trumpet_send"] forState:UIControlStateNormal];
|
||||
[_releaseButton addTarget:self action:@selector(onReleaseButtonClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _releaseButton;
|
||||
}
|
||||
- (UILabel *)releaseTimeDescLabel {
|
||||
if (!_releaseTimeDescLabel) {
|
||||
_releaseTimeDescLabel = [[UILabel alloc] init];
|
||||
_releaseTimeDescLabel.text = @"发布后,1分钟内不可再发布广播";
|
||||
_releaseTimeDescLabel.font = [UIFont systemFontOfSize:10];
|
||||
_releaseTimeDescLabel.textColor = [ThemeColor normalNobleTextColor];
|
||||
}
|
||||
return _releaseTimeDescLabel;
|
||||
}
|
||||
- (UIView *)countDownStackView {
|
||||
if (!_countDownStackView) {
|
||||
_countDownStackView = [[UIView alloc] init];
|
||||
_countDownStackView.hidden = YES;
|
||||
}
|
||||
return _countDownStackView;
|
||||
}
|
||||
- (UILabel *)countDownLabel {
|
||||
if (!_countDownLabel) {
|
||||
UILabel *label = [[UILabel alloc] init];
|
||||
label.text = @"0s";
|
||||
label.font = [UIFont systemFontOfSize:10];
|
||||
label.textColor = UIColorFromRGB(0xFDA615);
|
||||
_countDownLabel = label;
|
||||
}
|
||||
return _countDownLabel;
|
||||
}
|
||||
- (UILabel *)countDownDescLabel {
|
||||
if (!_countDownDescLabel) {
|
||||
UILabel *label = [[UILabel alloc] init];
|
||||
label.text = @"后可以再次发布";
|
||||
label.font = [UIFont systemFontOfSize:10];
|
||||
label.textColor = [ThemeColor textThirdColor];
|
||||
_countDownDescLabel = label;
|
||||
}
|
||||
return _countDownDescLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)maxCountLabel {
|
||||
if (!_maxCountLabel) {
|
||||
UILabel *label = [[UILabel alloc] init];
|
||||
label.text = @"0/20";
|
||||
label.font = [UIFont systemFontOfSize:12];
|
||||
label.textColor = [ThemeColor textThirdColor];
|
||||
_maxCountLabel = label;
|
||||
}
|
||||
return _maxCountLabel;
|
||||
}
|
||||
|
||||
@end
|
@@ -7,8 +7,7 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class XPReleaseRadioModel;
|
||||
@protocol XPFirstRechargeProtocol <NSObject>
|
||||
@protocol XPReleaseRadioProtocol <NSObject>
|
||||
|
||||
///发布广播成功
|
||||
- (void)releaseRoomRadioSuccess;
|
||||
|
@@ -18,13 +18,14 @@
|
||||
#import "XPReleaseRadioTableViewCell.h"
|
||||
///P
|
||||
#import "XPReleaseRadioPresenter.h"
|
||||
#import "XPReleaseRadioProtocol.h"
|
||||
///model
|
||||
#import "RoomInfoModel.h"
|
||||
#import "XPReleaseRadioModel.h"
|
||||
|
||||
static NSString *const KXPReleaseRadioTableViewCellIdentifier = @"KXPReleaseRadioTableViewCellIdentifier";
|
||||
|
||||
@interface XPReleaseRadioViewController ()<UITableViewDelegate, UITableViewDataSource, YYTextViewDelegate, XPReleaseRadioTableViewCellDelegate>
|
||||
@interface XPReleaseRadioViewController ()<UITableViewDelegate, UITableViewDataSource, YYTextViewDelegate, XPReleaseRadioTableViewCellDelegate, XPReleaseRadioProtocol>
|
||||
|
||||
///host代理
|
||||
@property (nonatomic,weak) id<RoomHostDelegate>hostDelegate;
|
||||
@@ -83,6 +84,12 @@ static NSString *const KXPReleaseRadioTableViewCellIdentifier = @"KXPReleaseRadi
|
||||
return [[XPReleaseRadioPresenter alloc] init];
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
if (self.timer != nil) {
|
||||
dispatch_source_cancel(self.timer);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[self initSubViews];
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#import "AttachmentModel.h"
|
||||
#import "ArrangeMicModel.h"
|
||||
#import "XPReleaseRadioModel.h"
|
||||
#import "XPNobleTrumpetModel.h"
|
||||
///View
|
||||
#import "BaseNavigationController.h"
|
||||
#import "XPRoomActivityContainerView.h"
|
||||
@@ -40,6 +41,7 @@
|
||||
#import "XPRoomSettingViewController.h"
|
||||
#import "XPRoomSettingInputView.h"
|
||||
#import "XPReleaseRadioViewController.h"
|
||||
#import "XPRoomTrumpetViewController.h"
|
||||
///P
|
||||
#import "XPRoomPresenter.h"
|
||||
#import "XPRoomProtocol.h"
|
||||
@@ -130,6 +132,7 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myGiftEffectUpdate:) name:kRoomGiftEffectUpdateNotificationKey object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(gotoRoomSetting:) name:kRoomRoomSettingNotificationKey object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onReleaseRadioClick:) name:kRoomReleaseRadioNotificationKey object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onNobleTrumpetClick:) name:kRoomNobleTrumpetNotificationKey object:nil];
|
||||
}
|
||||
|
||||
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
|
||||
@@ -324,6 +327,15 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
|
||||
[self.getCurrentNav presentViewController:releaseRadioVC animated:YES completion:nil];
|
||||
}
|
||||
|
||||
#pragma mark - 房间小喇叭
|
||||
- (void)onNobleTrumpetClick:(NSNotification *)notification {
|
||||
XPNobleTrumpetModel *model = (XPNobleTrumpetModel *)notification.object;
|
||||
XPRoomTrumpetViewController * trumpetVC = [[XPRoomTrumpetViewController alloc] initWithDelegate:self];
|
||||
trumpetVC.model = model;
|
||||
trumpetVC.modalPresentationStyle = UIModalPresentationOverFullScreen;
|
||||
[self.getCurrentNav presentViewController:trumpetVC animated:YES completion:nil];
|
||||
}
|
||||
|
||||
#pragma mark - XPRoomProtocol
|
||||
- (void)initEnterRoomSuccess:(RoomInfoModel *)roomInfo user:(UserInfoModel *)userInfo {
|
||||
userInfo.fromUid = self.fromUid;
|
||||
|
Reference in New Issue
Block a user