jdg / MBProgressHUD

MBProgressHUD + Customizations
http://www.bukovinski.com/
MIT License
16.01k stars 3.56k forks source link

hide a hub and then show immediately but can not see it #281

Closed bluesky0109 closed 9 years ago

bluesky0109 commented 9 years ago

self.aHub = [[MBProgressHUD alloc] initWithView:self.view]; self.aHub.mode = MBProgressHUDModeText; self.aHub.labelText = @"some hub xxx"; [self.view addSubview:self.aHub]; [self.aHub show:YES];

dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 2 * NSEC_PER_SEC);
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){

    [self.aHub hide:YES];

// NSLog(@"sup>>%@",self.aHub.superview); // sleep(2);

    self.aHub.labelText = @"dkflskjlfls";
    [self.aHub show:YES];

});

I can not see second hub

matej commented 9 years ago

http://stackoverflow.com/a/5834571/88854

gerchicov-bp commented 8 years ago

Doesn't work! It just makes the bug appear less often