开发者

Hide ActivityIndicator and display Title in NavigationBar

i display an activityindicator like

    CGRect frame = CGRectMake(0.0, 0.0, 25.0, 25.0);
loading = [[UIActivityIndicatorView alloc] initWithFrame:frame];
[loading startAnimating];
[loading sizeToFit];
loading.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin |
                            UIViewAutoresizingFlexibleRightMargin |
                            UIViewAutoresizingFlexibleTopMargin |
                            UIViewAutoresizingFl开发者_运维技巧exibleBottomMargin);

self.navigationItem.titleView = loading;

in my navigationbar on the top. And i call:

[loading stopAnimating];

to stop.

This works like it should, but after hiding the activity indicator i want to display a text (self.title = @"text";) and this is not working.

What do i miss? Thanks for your help!


Try setting the self.navigationItem.titleView to nil and then set the title.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜