I need to be able to remove a button from a view and add a different one. My code looks like this:
-(void)UpdatePromoBanner:(NSString*)value{
[button setTitl
Oscar is right. You have to update the interface on the main thread. Figured I'd add in some code to help.
Replace:
[subView removeFromSuperview];
With:
[subView performSelectorOnMainThread:@selector(removeFromSuperview) withObject:nil waitUntilDone:NO];
And I think you should be good to go without changing anything else.
You cannot update the UI using a secondary thread, whenever your thread is doing UI updates you must call the main thread.
dispatch_async(dispatch_get_main_queue(), ^{
[subView removeFromSuperview];
});
Remember update UI in main thread :)