I have an issue that I am stumped on and really could use some help please.
I will try and explain this as simply as I can.
I have two view controllers, VC A and VC B.
VC A is running code that is receiving data from a tcp stream. Upon detecting a certain trigger VC A calls a method on VC B.
The method on VB B is to read contents from a specific table in a SQLITE db and then use some of that data to populate a Text View on VC B.
Now, the issue is that if the method on VC B is initiated by VC A, the TEXT VIEW does NOT get updated. The method is definitely getting called because I can NSLOG the output from the method, it just doesnt update in the TEXT VIEW.
Now, I also have a button on VC B, as a test! When I press this button on VC B the method is called, reads the data from the db and then populates the TEXT VIEW. The button is calling the exact same method as VC A is calling.
Everything is working, when the method is called from VC A or VC B, apart from the TEXT VIEW being updated when calling from VC A.
[self.messageTXT performSelectorOnMainThread: @selector(setText
withObject:[NSString stringWithFormat:@%@%@", self.messageTXT.text, msg]
I have tried forcing the TEXT VIEW update to use the main thread and still no luck when calling from VC A. Only if the button is pressed on VC B does it then update.
Has anyone any experience on calling methods on another VC and updating the UI using data from that particular VC and NOT the calling VC?
If you need any other code or have any questions please let me know.
Thanks in advance!!!