Commit 7544f296 authored by guanghui.shi's avatar guanghui.shi

弹窗逻辑再次变更

parent 96cbac69
......@@ -107,15 +107,27 @@ static NSString * floats_pop_sets = @"floats_pop_sets";
self.floatsPopViews =[NSMutableArray array];
self.activePopViews = [NSMutableArray array];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(removeAllPopViews) name:ModelCenterUserLogOutNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(resetAllPopViews) name:ModelCenterUserLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(logoutRemoveAllPopViews) name:ModelCenterUserLogOutNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginRemoveAllPopViews) name:ModelCenterUserLoginNotification object:nil];
}
return self;
}
/// 移除当前所有的弹窗
- (void)removeAllPopViews
- (void)logoutRemoveAllPopViews
{
[self resetAllPopViewsCleanLocal:YES];
}
/// 重新设置所有的弹窗
- (void)loginRemoveAllPopViews
{
[self resetAllPopViewsCleanLocal:NO];
}
- (void)resetAllPopViewsCleanLocal:(BOOL)clean
{
/// 移除当前所有的弹窗视图
if (self.activePopViews.count) {
......@@ -133,22 +145,19 @@ static NSString * floats_pop_sets = @"floats_pop_sets";
}
[self.activePops removeAllObjects];
[self.invalidActivityPops removeAllObjects];
[self.invalidFloatPops removeAllObjects];
if (clean) {
/// 清空本地的标记
[self cleanLocalUniques];
[self.invalidActivityPops removeAllObjects];
[self.invalidFloatPops removeAllObjects];
}
for (QGActivityPopControlModel *model in self.popIndexs) {
model.shouldReset = YES;
}
}
/// 重新设置所有的弹窗
- (void)resetAllPopViews
{
[self removeAllPopViews];
}
#pragma mark - 网络模块
/// 检查当前记录是否包含本次弹窗位置
......
......@@ -130,9 +130,9 @@
}
else{ // 其他一律放在右下,下面的位置偏下一点
if (self.controller && self.controller.tabBarController.tabBar.isHidden){
self.bottom = controller.view.height - 20;
self.bottom = controller.view.height - 70;
}else{
self.bottom = controller.view.height - 20 - [DeviceAdaptation getTabBarHeight];
self.bottom = controller.view.height - 70 - [DeviceAdaptation getTabBarHeight];
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment