I know Apple said all UI-related operations should be carried out on main thread.
So my question is "all UI-related operations" really mean every possible UI-related operaton?
For example, I will addSubview ViewB to ViewA in a separate thread. Should I always use [ViewA performSelectorOnMaintThread:@selector(addSubview:)...... on the separate thread?
thanks
Yes.
It will crash otherwise.
Yes, You should deal with all about UI in the main-thread. If you are under MFC, you should be in the same manner.
Grand Central Dispatch does things in background threads (for example this line:
dispatch_async(dispatch_get_main_queue(), myBlock);
) and no crash at all. And i do a lot of things onmyBlock()