Reputation: 349
I have a UISwitch
in a view. I have a anther thread to detect a value A.
I want to update view to set UISwitch
be true or false depend on value A which is true or false.
How can I update UIView to change UISwitch
in real time? Thank you.
Upvotes: 0
Views: 330
Reputation: 2229
Consider this:
dispatch_async(dispatch_get_main_queue()){
self.switchControl.on = aValue
}
Upvotes: 2