// delay 1 - performSelector
[self performSelector:@selectors(changeName:) withObject:nil afterDelay:5.0];

// delay 2 - dispatch_after
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
   lblName.text = @"dispatch_after 편하네";
});

 

+ Recent posts