views:

153

answers:

1

Hey all,

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 |
                            UIViewAutoresizingFlexibleBottomMargin);

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!

A: 

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

Jonathan