removeFromSuperview doesn't work

后端 未结 3 856
灰色年华
灰色年华 2021-02-20 01:29

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         


        
3条回答
  •  甜味超标
    2021-02-20 01:58

    dispatch_async(dispatch_get_main_queue(), ^{
             [subView removeFromSuperview];
    });
    

    Remember update UI in main thread :)

提交回复
热议问题