ios - Updating UIButton border color will delay? -


we using bluetooth communication send notification when connected main view controller, notification :

- (void) receiveblenotification:(nsnotification *) notification {      if ([[notification name] isequaltostring:@"bluetooth"])     {       //here log title right on time next happen after while       nslog(@"!!!!!!!");      l1.layer.bordercolor=[globals sharedglobals].maincolor.cgcolor;      l2.layer.bordercolor=[globals sharedglobals].maincolor.cgcolor; 

so reason color changed 6 seconds after log.

is there way force change ?

solved :

  dispatch_async(dispatch_get_main_queue(), ^{                 //here update required ui             }); 

Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -