What's the right way to add a ToolBar to a UITableView?

后端 未结 5 1070
情深已故
情深已故 2021-01-31 04:27

I\'m writing a Navigation-Based iPhone app, and I\'d like to have a UIToolBar docked at the bottom of my screen, with a UITableView scrolling between the tool bar and the naviga

5条回答
  •  北海茫月
    2021-01-31 05:02

    Corey Floyd is mostly correct, except that

    [self.navigationController setToolBarHidden:NO];
    

    should be

    [self.navigationController setToolbarHidden:NO];
    

    That is, the "b" in "setToolbarHidden" must be lowercase. Also, method name listed in the iPhone OS Reference is actually

    - (void)setToolbarHidden:(BOOL)hidden animated:(BOOL)animated
    

    though it seems that omitting the animated parameter works too.

提交回复
热议问题