开发者

ActivityIndicator not showing during NSXMLParsing

i'm about to write a simple App where in one UIView (called via TabBar) a RSS-Feed is loaded from a URL and parsed to show the Feed-Entrys in a Simple UITableView.开发者_Go百科

Within this UIView i created a UIActivityIndicatorView, connected it to a UIActivityIndicatorView in Interface Builder and set the attribute "animating" and "hide when stopped".

The NSXMLParser starts in ViewDidAppear and i'm calling

[theActityIndicator startAnimating]; 

at the beginning (before starting downloading the Feed-Data and parsing it).

My Problem is now, that the ActivityIndicator is not showing, it seems that the View is not Displayed on the device at the moment where ViewDidAppear is called.

Any hint for me how i can manage that?

I have also an IBAction defined where i do a reload of the Feed-Data and reparse it. After that a [myTableView reloadData]; is called. Also at this action (startet via Button in Toolbar) the Activity Indicator is not displayed.


i changed all the code to use Threading and now it works. As long as the Parser is doing his job, there seems to be no update to the GUI. Threading is your friend if you stuck in the same problem !

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜