Sorry for the newbie question (maybe). I am developing an application for ios and I am trying to do an external xml reading from the main thread so as not to slow down the ui while the call does its magic.
This is the only way I know so that the process does not execute on the main thread in object c
[self performSelectorInBackground:@selector(callXml) withObject:self];
so i included my call in function
- (void)callXml{ [RXMLElement elementFromURL:[NSURL URLWithString:indXML]]; }
Now I need the indXML string to be the parameter of the function to call another xml as I need. Something like
- (void)callXml:(NSString *) name{ [RXMLElement elementFromURL:[NSURL URLWithString:indXML]]; }
In this case, how will the call to the Selector function change? If I do this in the usual way, I get syntax errors:
[self performSelectorInBackground:@selector(callXml:@"test") withObject:self];
ios objective-c performselector
Sasha grievus
source share