红包背景蒙层优化
This commit is contained in:
@@ -19,6 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@property (nonatomic, strong) XPRedPacketModel *receiveModel;
|
||||
|
||||
@property (nonatomic, strong) UIView *alphaView;
|
||||
//@property (nonatomic, strong) NSDictionary *dict;
|
||||
|
||||
@end
|
||||
|
@@ -28,7 +28,6 @@
|
||||
|
||||
@property (nonatomic, strong) XPRedPacketResultModel *resultData;
|
||||
|
||||
@property (nonatomic, strong) UIView *alphaView;
|
||||
///背景
|
||||
@property (nonatomic, strong) UIImageView *bgImageView;
|
||||
///发送者头像
|
||||
|
@@ -960,6 +960,12 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
||||
for (XPRedPacketModel *data in list) {
|
||||
XPReceiveRedPacketView *view = [[XPReceiveRedPacketView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
|
||||
view.receiveModel = data;
|
||||
for (UIView *subView in self.view.subviews) {
|
||||
if([subView isKindOfClass:[XPReceiveRedPacketView class]]) {
|
||||
view.alphaView.backgroundColor = [UIColor clearColor];
|
||||
break;
|
||||
}
|
||||
}
|
||||
[self.view addSubview:view];
|
||||
[self.view bringSubviewToFront:view];
|
||||
}
|
||||
@@ -1177,6 +1183,12 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
||||
XPReceiveRedPacketView *view = [[XPReceiveRedPacketView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
|
||||
XPReceiveRedPacketModel *data = [XPReceiveRedPacketModel modelWithJSON:attachment.data];
|
||||
view.redPacketModel = data;
|
||||
for (UIView *subView in self.view.subviews) {
|
||||
if([subView isKindOfClass:[XPReceiveRedPacketView class]]) {
|
||||
view.alphaView.backgroundColor = [UIColor clearColor];
|
||||
break;
|
||||
}
|
||||
}
|
||||
[self.view addSubview:view];
|
||||
[self.view bringSubviewToFront:view];
|
||||
}
|
||||
|
@@ -380,6 +380,12 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||
}
|
||||
XPReceiveRedPacketModel *data = [XPReceiveRedPacketModel modelWithJSON:attachment.data];
|
||||
view.redPacketModel = data;
|
||||
for (UIView *subView in roomVC.view.subviews) {
|
||||
if([subView isKindOfClass:[XPReceiveRedPacketView class]]) {
|
||||
view.alphaView.backgroundColor = [UIColor clearColor];
|
||||
break;
|
||||
}
|
||||
}
|
||||
[roomVC.view addSubview:view];
|
||||
[roomVC.view bringSubviewToFront:view];
|
||||
*stop = YES;
|
||||
@@ -392,6 +398,12 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||
view.inAllPacketRoom = NO;
|
||||
XPReceiveRedPacketModel *data = [XPReceiveRedPacketModel modelWithJSON:attachment.data];
|
||||
view.redPacketModel = data;
|
||||
for (UIView *subView in currentVc.view.subviews) {
|
||||
if([subView isKindOfClass:[XPReceiveRedPacketView class]]) {
|
||||
view.alphaView.backgroundColor = [UIColor clearColor];
|
||||
break;
|
||||
}
|
||||
}
|
||||
[currentVc.view addSubview:view];
|
||||
[currentVc.view bringSubviewToFront:view];
|
||||
}
|
||||
|
Reference in New Issue
Block a user