Search code examples
xcodeipadios4uibutton

Button in IPad SplitView tableViewCell


I want to add 3 buttons in the RootViewController for the iPad SplitViewController. I want to display these 3 buttons in a tabular form so that clicking on each I get a separate view in the detailViewController


Solution

  • Since you haven't given a whole lot of details on this question, I'll assume that this is what you want: UISegmentedControl

    Here's an example of what it will look like on an iPhone. It's basically the same on an iPad:

    Segmented Control
    (source: episode-2.com)

    To add it to a Navigation Bar, use the [[UIBarButtonItem alloc] initWithCustomView:segmentedControl] method. You can then add it like a normal UIBarButtonItem.