jimsir

Results 5 issues of jimsir

/// 安全删除观察者 - (void)paegRemoveObserver:(nonnull NSObject *)observer forKeyPath:(nonnull NSString *)keyPath context:(nullable void *)context;

question

你好,在从横屏的全屏视频播放页面返回来的时候,会出现顶部导航栏的title消失不见,而且底部会多出来一段大概tabbar高度的空白; 我使用的是继承WMZPageController;查看UI发现 PageView高度是正常的,WMZPageScroller底部有空白,WMZPageLoopView 又多出来一段空白;

answered

代码位置:WMZDropDownMenu 文件, - (void)judgeBtnTitle:(WMZDropMenuBtn*)sender 方法,第431 行,有可能出现数组越界的崩溃 我在如下判断里面加了` self.titleBtnArr.count>self.lastSelectIndex`的判断 ``` if (!self.close&& self.lastSelectIndex >= 0 && self.titleBtnArr.count>self.lastSelectIndex) { WMZDropMenuBtn *lastBtn = self.titleBtnArr[self.lastSelectIndex]; [self dataChangeActionSection:[self getTitleFirstDropWthTitleBtn:lastBtn].section WithKey:nil]; } ```

如何动态更改标题的内容,比如下图,点击第一个 section 里面的某个选项,隐藏销量标题 ![image](https://github.com/wwmz/WMZDropDownMenu/assets/12293083/fe1b2008-8a46-4f30-a285-604ff838c816) 可能是我不会使用的关系,目前我就找到下面三个方法,似乎都无法做到上面的效果 ``` /// 更新全局位置某个数据源的数据 可更换选中状态 显示文字等。。。 根据WMZDropTree 对应属性改变 - (BOOL)updateDataConfig:(NSDictionary*)changeData AtDropIndexPathSection:(NSInteger)section AtDropIndexPathRow:(NSInteger)row AtIndexPathRow:(NSInteger)indexPathRow; /// 更新所有UI和数据 - (void)updateUI; /// 重置所有数据 恢复原来 - (void)resetAll; ```

我感觉通过`getCurrentVC`方法,获取到的Controller 不一定是菜单所在的 Controller,也许是我用错了,希望作者能提出指导 代码位置:WMZDropDownMenu.m 文件的 menuTitle 方法里面,232 行 ``` if([[WMZDropMenuTool getCurrentVC] respondsToSelector:@selector(viewWillDisappear:)] || [[WMZDropMenuTool getCurrentVC] respondsToSelector:@selector(viewDidDisappear:)]){ ///hook监听当前控制器消失 @MenuWeakSelf(self); [[WMZDropMenuTool getCurrentVC] aspect_hookSelector:@selector(viewWillDisappear:) withOptions:AspectOptionAutomaticRemoval usingBlock:^(id aspectInfo){ @MenuStrongSelf(self); if(!self.close){ self.hook = YES; [self...