Comments (6)
本质是present出来的。和正常present另一个界面是一样的,所以会走vc的所有生命周期函数。如果你不希望执行viewwillappear里面的部分代码,可以事先做一个标记让它不执行或者看能不能把代码搬迁到其他位置。
from cwlateralslide.
我知道是present的,但是侧边栏一启动,就是present后,开启的vc的viewwillappear就触发了,正常present是关闭之后,触发present的vc才会触发viewwillappear
from cwlateralslide.
你是说 当 A present B 的时候。A的viewwillappear方法也调用了是吗? 这个是因为在自定义转场结束的时候,调用[transitionContext completeTransition:YES];这个方法系统会把A的视图从containerView中移除掉,于是我在后面手动将 A的视图重新加到containerView中。。这样才能显示到界面上,于是addsubview:A.view]这一操作会造成A的viewwillappear方法调用。
from cwlateralslide.
对,就是这样,有办法解决吗?我现在需求是点解侧边栏切换模式,viewwillappear再重新加载数据,我不想触发两次viewwillappear
from cwlateralslide.
或者说,我在viewwillappear加个判断,我本地存储一个变量判断,但是怎么知道现在是关闭,还是开启呢?
from cwlateralslide.
show的时候 设置标记为YES,然后在viewwillAppear里面判断这个标记为YES,就将此标记设置为NO,同时return,不执行后面的代码。
- viewwillapear {
[super ...];
if (flag == YES) {
flag = NO;
return;
}
}
from cwlateralslide.
Related Issues (20)
- 布局不受抽屉VC约束
- iOS13,调用抽屉效果后返回,无论哪一层都会回到首页。 HOT 3
- 抽屉页面下隐藏tabbar无效? HOT 1
- 隐藏navigationbar导致侧滑白屏
- dismiss异常问题,设置rootViewController的ModalTransitionStyle可以解决 HOT 2
- CWLateralSlide和RTRootNavigationController结合使用的问题 HOT 3
- cw_pushViewController 不能显示下一个控制器导航栏 HOT 3
- 设置maskAlpha为0不管用 HOT 2
- 在三级控制器调用系统摄像头dismiss后回首页黑屏
- [self dismissViewControllerAnimated:YES completion:nil]; iOS13返回白屏
- 抽屉式做筛选功能的,dismiss之后页面没有之前的状态了 HOT 3
- 多个控制器都有侧滑窗口的时候cw_push会有问题
- 横竖屏问题
- 模态出来的vc,打开侧滑抽屉时,vc会上移至顶部
- 强制实现push到下一个controller返回后能保持抽屉打开状态以后产生的问题
- Unbalanced calls to begin/end appearance transitions for < mainViewController: 0x12f510530>
- 请问为什么 dissmiss 的时候 会闪烁一下呢?
- 返回白屏
- cw_pushViewController到一个控制器直接白屏
- 关于蒙版的优化 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cwlateralslide.