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

弹窗逻辑再次变更

parent 96cbac69
......@@ -107,46 +107,55 @@ 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
{
/// 移除当前所有的弹窗视图
if (self.activePopViews.count) {
[self.activePopViews enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
[obj removeFromSuperview];
}];
[self.activePopViews removeAllObjects];
}
/// 移除所有浮窗视图
if (self.floatsPopViews.count) {
[self.floatsPopViews enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
[obj removeFromSuperview];
}];
[self.floatsPopViews removeAllObjects];
}
[self.activePops removeAllObjects];
[self.invalidActivityPops removeAllObjects];
[self.invalidFloatPops removeAllObjects];
/// 清空本地的标记
[self cleanLocalUniques];
for (QGActivityPopControlModel *model in self.popIndexs) {
model.shouldReset = YES;
}
[self resetAllPopViewsCleanLocal:YES];
}
/// 重新设置所有的弹窗
- (void)resetAllPopViews
- (void)loginRemoveAllPopViews
{
[self removeAllPopViews];
[self resetAllPopViewsCleanLocal:NO];
}
- (void)resetAllPopViewsCleanLocal:(BOOL)clean
{
/// 移除当前所有的弹窗视图
if (self.activePopViews.count) {
[self.activePopViews enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
[obj removeFromSuperview];
}];
[self.activePopViews removeAllObjects];
}
/// 移除所有浮窗视图
if (self.floatsPopViews.count) {
[self.floatsPopViews enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
[obj removeFromSuperview];
}];
[self.floatsPopViews removeAllObjects];
}
[self.activePops removeAllObjects];
if (clean) {
/// 清空本地的标记
[self cleanLocalUniques];
[self.invalidActivityPops removeAllObjects];
[self.invalidFloatPops removeAllObjects];
}
for (QGActivityPopControlModel *model in self.popIndexs) {
model.shouldReset = YES;
}
}
#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