How to change frame size of the UIView in NSThread ? Can anyone help me ?
Thanks in advance...........
How to change frame size of the UIView in NSThread ? Can anyone help me ?
Thanks in advance...........
UIKIt is not thread safe, therefore you cannot change the view from the background, all NSObjects have the selector performSelectorOnMainThread, since NSThread extends NSObject then you can use that method to execute code in the main thread, that is where you should change the UIViews frame, also you must have the reference to the UIView somewhere...the way i would do it is define a protocol on the NSThread subclass and implement the protocol in the views view controller, then whenever u need to change the view frame, call the delegate method in the main thread to change the views frame...hope this helps