itemprop = "text">
I have a UITableViewController (OnTVViewController) which is seeing DidLoad is similar to the below (originally parsed some XML in the background And shows an activity indicator while it is happening).
- (zero) viewDidoad {onTVXMLParser * xmlParser = [[onTVXMLParser alloc] init]; / * Parsing commands in background * / [NSThread detachNewThreadSelector: @selector (pars) to target: xml parser with object: self]; // [xmlParser parse]; // New view to disable user interaction during download. LoadView = [[UIView alloc] initWithFrame: [[UIScreen main screen] border]]; LoadView.backgroundColor = [UIColor darkGrayColor]; // Loader Spinner UIActivityIndicatorView * act = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle: UIActivityIndicatorViewStyleWhiteLarge] ;; [LoadView addSubview: Act]; Act.center = loadView.center; [Self.view addSubview: loadView]; [Self.view LaosVivio Toufrant: Loadvis]; [Starting the act]; [Issue issued]; [Super viewedload]; } This is also the way to remove activity indicators in the OnTVViewController (only trying to log a message during debugging):
- (zero) removeActivityView [/ [Remove the LoadViewArmospeaveView]; NSLog (@ "activity should be seen here"); } I have in my OttexML process class:
- (BOOL) parse {NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSLog (@ "Sleeping for 5 Seconds"); [NSThread sophisticated interval: 5.0]; NSLog (@ "Sleep finished"); // Time has passed. I want to remove the activity view. Self Performance Selector main andthread: @Selector (deletedActiviviewView) with object: Zero Waiting Don: Wrong]; // Create an NSURL with the RSS feed address and use NSXMLParser NSURL * url = [[NSURL alloc] initWithString: @ "http://aurl.com/xml"] to immediately; NSXMLParser * parser = [[NSXMLParser alloc] initWithContentsOfURL: url]; // snap lots of parsing material, it all runs [pool release]; Yes come back } After the "pars" method is exhausted on the XMLParser class, I want to call removeActivityIndicator on the OTV Controller object. This is probably really simple but I'm new to iPhone programming and beating my head against the wall.
I understand that I need to use selectNearMainThread - but how do I refer to the example of OnTVViewController, which I want to target? I imported the OnTVViewController header file to the ONTVXLLPERSER.
- I get an error at the moment:
< Usually cocoa handles it with a representative pattern, basically add an applicant to the named reporter named representative and launch the parade to the representative. Set yourself up (Ontivi Viv Controller), and then post it in the XML parser for all callbacks. Use
Comments
Post a Comment