Iphone Application:-My Application Crash

后端 未结 2 632
小蘑菇
小蘑菇 2020-12-22 08:45

I make one custom cell class like this.

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {

self = [super initWith         


        
2条回答
  •  一个人的身影
    2020-12-22 08:56

    As mentioned by @Rajneesh071, UI changes must be performed on the main thread.

    This can be done using:

    [self performSelectorOnMainThread:@selector(doYourUIChanges:) withObject:nil waitUntilDone:YES];
    

    Or if you want a section of in-line code to be performed on the main thread, use this:

    dispatch_async(dispatch_get_main_queue(), ^{
        /* YOUR UI STUFF */
    });
    

提交回复
热议问题