Multi-line title UINavigationBar with different format

cocoa-touch, ios, iphone, objective-c

Solution

You can use the `UIViewController` `navigationItem` and set its `titleView` property to a `UILabel`. You can then use any font, make it a two line label or use an `NSAttributedString` to use several fonts in the same label. Alternatively you can use a custom View instead of a `UILabel` and set it as the title view.

Problem

How can I add a multi-line title to my UINavigationBar with different formats? i.e. i'm making a XMPP client in iOS to chat with Facebook and i want to show in my chat room the friends name and if is typing or not in UINavigationBar. However, I want to show this information with different formats (name bigger than isTyping notification).

Original source