Add segmented control to navigation bar and keep title with buttons

后端 未结 8 2602
借酒劲吻你
借酒劲吻你 2020-12-04 10:03

I want to add segmented control to the navigation bar but also keep the title and buttons, like in iOS 7 Appstore purchased section (example)

I have tried adding seg

8条回答
  •  无人及你
    2020-12-04 10:46

    I have tried solving your problem using another approach since using a navigation bar only didn't seem to work out (maybe it's because the AppStore app is using a private api but I'm not knowledgeable enough to tell for sure...) Anyway I simply used a toolbar placed just underneath the navigation bar on which I added a segmented control, all inside a regular UIViewController.

    This is what it looks like in Storyboard: Storyboard

    And this is the result in Simulator:

    Simulator

    Just be careful to offset the table view down to account for the vertical space used up by the toolbar. Hope this helps!

提交回复
热议问题