修改了礼物面板刘海屏幕的适配
This commit is contained in:
@@ -47,8 +47,8 @@
|
||||
@property (nonatomic,strong) XPGiftInfoView *giftInfoView;
|
||||
///送多少礼物
|
||||
@property (nonatomic,strong) XPGiftBarView *giftBarView;
|
||||
///
|
||||
@property (nonatomic,strong) XPGiftPresenter *giftPresenter;
|
||||
///底部的View
|
||||
@property (nonatomic,strong) UIView * bottomView;
|
||||
///房主的uid
|
||||
@property (nonatomic,copy) NSString *roomUid;
|
||||
///使用的地方
|
||||
@@ -60,6 +60,11 @@
|
||||
@end
|
||||
|
||||
@implementation XPSendGiftView
|
||||
|
||||
- (XPGiftPresenter *)createPresenter {
|
||||
return [[XPGiftPresenter alloc] init];
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
NSLog(@"六面板销毁了");
|
||||
}
|
||||
@@ -87,6 +92,7 @@
|
||||
[self.stackView addArrangedSubview:self.userView];
|
||||
[self.stackView addArrangedSubview:self.giftInfoView];
|
||||
[self.stackView addArrangedSubview:self.giftBarView];
|
||||
[self.stackView addArrangedSubview:self.bottomView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
@@ -103,12 +109,16 @@
|
||||
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.bottom.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
[self.bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(kSafeAreaBottomHeight);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)initHttpRequest {
|
||||
[self.giftPresenter getUserWallInfo];
|
||||
[self.giftPresenter getNormalGiftList:self.roomUid];
|
||||
[self.giftPresenter getPackGiftList];
|
||||
[self.presenter getUserWallInfo];
|
||||
[self.presenter getNormalGiftList:self.roomUid];
|
||||
[self.presenter getPackGiftList];
|
||||
}
|
||||
|
||||
#pragma mark - Send Custom Message
|
||||
@@ -298,7 +308,7 @@
|
||||
}
|
||||
self.giftBarView.sendButtonIsEnable = NO;
|
||||
///发送消息
|
||||
[self.giftPresenter sendGift:uidString giftNum:giftNumber sendType:sendType giftId:giftId giftSource:sourceType giftType:giftInfo.giftType roomSendType:roomSendType roomUid:self.roomUid msg:@""];
|
||||
[self.presenter sendGift:uidString giftNum:giftNumber sendType:sendType giftId:giftId giftSource:sourceType giftType:giftInfo.giftType roomSendType:roomSendType roomUid:self.roomUid msg:@""];
|
||||
} else {
|
||||
[self showErrorToast:@"请选择至少一个人"];
|
||||
return;
|
||||
@@ -352,7 +362,7 @@
|
||||
self.packGiftRetryCount ++;
|
||||
if (self.packGiftRetryCount <= 10) {
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[self.giftPresenter getPackGiftList];
|
||||
[self.presenter getPackGiftList];
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -366,7 +376,7 @@
|
||||
self.normalGiftRetryCount ++;
|
||||
if (self.normalGiftRetryCount <= 10) {
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[self.giftPresenter getNormalGiftList:self.roomUid];
|
||||
[self.presenter getNormalGiftList:self.roomUid];
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -377,7 +387,7 @@
|
||||
///更新个数
|
||||
[self.giftInfoView updatePackSource:receiveInfo numberUser:uidCount];
|
||||
} else {
|
||||
[self.giftPresenter getUserWallInfo];
|
||||
[self.presenter getUserWallInfo];
|
||||
}
|
||||
[self sendCustomMessage:receiveInfo oringinDic:originDic];
|
||||
}
|
||||
@@ -478,12 +488,12 @@
|
||||
return _stackView;
|
||||
}
|
||||
|
||||
- (XPGiftPresenter *)giftPresenter {
|
||||
if (!_giftPresenter) {
|
||||
_giftPresenter = [[XPGiftPresenter alloc] init];
|
||||
[_giftPresenter attatchView:self];
|
||||
- (UIView *)bottomView {
|
||||
if (!_bottomView) {
|
||||
_bottomView = [[UIView alloc] init];
|
||||
_bottomView.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
return _giftPresenter;
|
||||
return _bottomView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
Reference in New Issue
Block a user