I want to have a titleView in my navigationItem so that I get something like this at the top of the screen.

[![Desired nav bar in UI](https://i.stack.imgur.com/jjQ72.png)](https://i.stack.imgur.com/jjQ72.png)

I have found how to do this in code, like

```
navigationItem.titleView = MyCustomUiView

```

but I want to do it in the source code of the storyboard.

I get the rightBarButtonItem to display fine, but when I try to add a titleView barButtonItem, the xml won't parse.

Here is what I am trying:

```
                   <navigationItem key="navigationItem" id="ddL-ut-3b9">    
                    <barButtonItem key="titleView" style="plain" id="11600">
                        <view key="customView" contentMode="scaleToFill" id="11599">
                            <rect key="frame" x="0.0" y="0.0" width="140" height="44"/>
                            <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES" flexibleMinY="YES"/>
                            <color key="backgroundColor" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace" white="0" alpha="0"/>                                                                
                            <subviews>
                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Disclaimer" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="11601">
                                    <rect key="frame" x="0.0" y="0.0" width="116" height="37"/>
                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES" flexibleMinY="YES"/>
                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                    <color key="textColor" colorSpace="custom" customColorSpace="sRGB" red="0.982638542758316" green="1" blue="0.96209174603214" alpha="1"/>                                        <nil key="highlightedColor"/>
                                    <color key="backgroundColor" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace" white="0" alpha="0"/>                                    </label>
                            </subviews>
                        </view>
                    </barButtonItem>               
                   <barButtonItem key="rightBarButtonItem" title="Log Out" style="plain" id="o6O-LC-29z">
                        <color key="tintColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
                        <connections>                                <action selector="btnLogOut:" destination="24s-67-KDm" id="8tF-zL-Lq7"/>
                        </connections>
                    </barButtonItem>
                </navigationItem>

```

What am I doing wrong?

This one displays fine when it is the only one 

```
 <barButtonItem key="rightBarButtonItem" 

```

But when I add 

```
 <barButtonItem key="titleView"

```

I get, Could not parse xml

Ideas?