Vee*_*eru 1 iphone objective-c uiview
嗨,我遇到了一些与此有关的混乱; 我想在视图出现后才执行某些操作,可能在收集数据时显示活动指示.我已经在viewWillAppear中编写了我的代码,但它似乎是在视图出现在屏幕上之前触发的.我已经用一些NSLog语句对此进行了双重检查,并且我在viewWillAppear中添加了2秒的睡眠,NSLog语句被触发,并且视图仅在延迟2秒后出现 - 我预计,一旦视图执行了2秒延迟进入屏幕?
难道我做错了什么?我甚至尝试过viewDidAppear,同样的事情.有什么建议?
谢谢
编辑:我想清楚地说明我在做什么
1. i have a parent view, which has a scroll view - and a subview
2. In the parent view, i create multiple instances of the subview and add them to the scrollview, creating scrollable views, which work.
3. Each view is passed an argument and depending on the argument the view contents change - works as expected.
4. I would like to show the subview and once its on the screen, do some internet opearations while i show an activity indicator, for this i need to use viewDidApper.
5. I am manually firing the subview's viewDidAppear from the parent view, once i have created its instance
Run Code Online (Sandbox Code Playgroud)
这里的问题是,只有在所有操作完成后才会出现视图.
我该怎么办呢?
| 归档时间: |
|
| 查看次数: |
397 次 |
| 最近记录: |