Visually modifying a UIToolbar from xcode storyboard

前端 未结 3 1166
执笔经年
执笔经年 2020-12-06 03:25

I\'m using XCode 4 and storyboarding an application I\'m creating, however I cannot visually modify the UIToolbar.

I\'m attempting to modify a UIToolbar that is insi

3条回答
  •  遥遥无期
    2020-12-06 03:46

    UITableViewControllers only allow one view object, which of course is UITableView. UITableViews are not cooperative for subviewing and they usually push everything into footers or headers. Something like this isn't possible:

    -TableController
        -Table
            -Subview
            -Another subview
    

    UITableViewControllers are reduced to this:

    -TableViewController
        -Table
    

    So you will need to use a UIViewController and declare a UITableView in there. Heres the Hierarchy you should use then:

    - ViewController 
        - View           
            -Table
            - Your UIToolbar
    

    In your ViewController.h declare IBOutlet UITableView and connect Data Source and Delegate to the ViewController. Then simply add the UITableView implementations to your .m file and you're good to go.

提交回复
热议问题