个播发起PK弹窗优化

This commit is contained in:
chenguilong
2022-04-11 16:02:36 +08:00
parent 1c357bb1dd
commit a685b8c70a
24 changed files with 185 additions and 7 deletions

View File

@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "anchorPk_micro_attention@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "anchorPk_micro_attention@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "anchorPk_micro_follow@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "anchorPk_micro_follow@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "anchorPk_micro_had_follow@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "anchorPk_micro_had_follow@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "anchorPk_panel_ruleBg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "anchorPk_panel_ruleBg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "anchorPk_panel_vs@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "anchorPk_panel_vs@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@@ -17,6 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
/// @param roomUid 房主的uid
/// @param pageNum 当前的页数
/// @param pageSize 一页多少个
/// @param pkType pk类型 个播2
+ (void)searchAnchorPKRoomList:(HttpRequestHelperCompletion)completion
erbanNo:(NSString *)erbanNo
roomUid:(NSString *)roomUid
@@ -29,6 +30,7 @@ NS_ASSUME_NONNULL_BEGIN
/// @param roomUid 房主的uid
/// @param pageNum 当前的页数
/// @param pageSize 一页多少个
/// @param pkType pk类型 个播2
+ (void)getAnchorPKRoomList:(HttpRequestHelperCompletion)completion
roomUid:(NSString *)roomUid
pageNum:(NSString *)pageNum

View File

@@ -15,6 +15,7 @@
/// @param roomUid uid
/// @param pageNum
/// @param pageSize
/// @param pkType pk
+ (void)searchAnchorPKRoomList:(HttpRequestHelperCompletion)completion erbanNo:(NSString *)erbanNo roomUid:(NSString *)roomUid pageNum:(NSString *)pageNum pageSize:(NSString *)pageSize pkType:(NSString *)pkType {
[self makeRequest:@"search/permitRoom" method:HttpRequestHelperMethodGET completion:completion,__FUNCTION__, erbanNo, roomUid, pageNum, pageSize, pkType, nil];
}
@@ -24,6 +25,7 @@
/// @param roomUid uid
/// @param pageNum
/// @param pageSize
/// @param pkType pk
+ (void)getAnchorPKRoomList:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid pageNum:(NSString *)pageNum pageSize:(NSString *)pageSize pkType:(NSString *)pkType {
[self makeRequest:@"search/permitRoom" method:HttpRequestHelperMethodGET completion:completion,__FUNCTION__, roomUid, pageNum, pageSize, pkType, nil];
}

View File

@@ -11,9 +11,9 @@ NS_ASSUME_NONNULL_BEGIN
@protocol XPAnchorPKProtocol <NSObject>
///开启咵房pk成功
///开启主播pk成功
- (void)beginAnchorPKSuccess;
///开启跨房Pk失败
///开启主播Pk失败
- (void)beginAnchorPKFail:(NSString *)message;
@end

View File

@@ -246,13 +246,15 @@
self.doneButton.enabled = NO;
}
}
#pragma mark - XPAcrossRoomProtocol
- (void)beginAcrossRoomPKSuccess {
#pragma mark - XPAnchorPKProtocol
///pk
- (void)beginAnchorPKSuccess {
[self showSuccessToast:@"pk已发起请等待对方接受"];
[self dismissViewControllerAnimated:YES completion:nil];
}
- (void)beginAcrossRoomPKFail:(NSString *)message {
///Pk
- (void)beginAnchorPKFail:(NSString *)message {
if (message.length >0) {
TTAlertConfig * config = [[TTAlertConfig alloc] init];
config.actionStyle = TTAlertActionConfirmStyle;
@@ -524,7 +526,7 @@
_customTimeTextField.layer.cornerRadius = 15;
_customTimeTextField.layer.masksToBounds = YES;
_customTimeTextField.backgroundColor = UIColorFromRGB(0x4C4C6A);
_customTimeTextField.textColor = [UIColor whiteColor];
_customTimeTextField.textColor = UIColorFromRGB(0x43BDFF);
_customTimeTextField.leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 19, 0)];
_customTimeTextField.leftViewMode = UITextFieldViewModeAlways;
_customTimeTextField.delegate = self;
@@ -568,7 +570,7 @@
_pkPlayModeTextField.leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 19, 0)];
_pkPlayModeTextField.leftViewMode = UITextFieldViewModeAlways;
_pkPlayModeTextField.delegate = self;
_pkPlayModeTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"选填10个字以内" attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:15], NSForegroundColorAttributeName: UIColorFromRGB(0x43BDFF)}];
_pkPlayModeTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"选填10个字以内" attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:15], NSForegroundColorAttributeName: UIColorFromRGB(0xC6C6E9)}];
[_pkPlayModeTextField addTarget:self action:@selector(textFieldDidChanged:) forControlEvents:UIControlEventEditingChanged];
}
return _pkPlayModeTextField;

View File

@@ -0,0 +1,16 @@
//
// AnchorPKStageView.h
// xplan-ios
//
// Created by GreenLand on 2022/4/11.
//
#import "StageView.h"
NS_ASSUME_NONNULL_BEGIN
@interface AnchorPKStageView : StageView
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,12 @@
//
// AnchorPKStageView.m
// xplan-ios
//
// Created by GreenLand on 2022/4/11.
//
#import "AnchorPKStageView.h"
@implementation AnchorPKStageView
@end

View File

@@ -0,0 +1,16 @@
//
// AnchorPKMicroView.h
// xplan-ios
//
// Created by GreenLand on 2022/4/11.
//
#import "MicroView.h"
NS_ASSUME_NONNULL_BEGIN
@interface AnchorPKMicroView : MicroView
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,12 @@
//
// AnchorPKMicroView.m
// xplan-ios
//
// Created by GreenLand on 2022/4/11.
//
#import "AnchorPKMicroView.h"
@implementation AnchorPKMicroView
@end