If we have the requirement to customize our navigation bar’s title then we cannot change any feature of the navigation title.
|
So to solve this problem we can simply create a UILabel as follows :-
UILabel *titleLabel = (UILabel *)self.navigationItem.titleView; and then customize it according to our requirement and finally assign this titleLabel as follows :-
self.navigationItem.titleView = titleLabel;
Also inspite of assigning any frame value to this titleLabel you can simply use :-
[titleLabel sizeToFit];
|