I am trying to create a generic thread in my main representative, which I can use to display a UIActivic indicator . I have many ideas that push new ideas on the stack. In the calling scene, most of the thoughts are said to have been chosen by the ROW method. When they select a row in the UITableView, I want to start the activity indicator and push the new scene onto the stack. In the ViewDidLoad method of the new view, I make several calls from Jason to a server that can take some time in the process.
Can I make 2 ways in my main representative?
Can I make 2 ways in my main representative?
And from View1 call [startIndicator], which will show the activity indicator above all the ideas.
And call [stopIndicator] from View 2, after processing the ViewedLoad method, which will hide the activity indicator
Thank you for your help!
Yes, you can make sure to call any UIKit routine on the main thread. You can make it more "thread friendly" by typing the routine such as:
- (zero) start editor {if ([NSThread isMainThread] == incorrect) {[Self-ExecutorManetred: @Selector ( Startindicator) with object: during zero wait: no]; Return; } / * Actual UIIndicator Setup * /}
If you have multiple threads that can trigger or turn the indicator, you can add a reference count for the routine, every time While increasing the thread call "start" and when they say "off," turn on the activation indicator until the count is reduced to zero by the "stop" call.
Comments
Post a Comment