开发者

iphone uitabviewcontroller

开发者 https://www.devze.com 2023-01-16 16:09 出处:网络
I want to have same segmented control across on all navigation tabs with segment value change delegate in it which refereshes currently selected tab data. . I dont want to create different sengemented

I want to have same segmented control across on all navigation tabs with segment value change delegate in it which refereshes currently selected tab data. . I dont want to create different sengemented control for each tab.

Please guide me. Thanks in advance.

Regards, Mallesw开发者_Python百科ar


You would need to make your UISegmentedControl a peer of the UITabBarController view. So it would look like this:

 -------------------
|UISegmentedControl |
|-------------------|
|                   |
|                   |
|                   |
|                   |
|                   |
|UITabBarController |
|                   |
|                   |
|                   |
|                   |
|                   |
 -------------------

The key here is that your UISegmentedControl needs to not be a subview of the UITabBarController view, so I would create a separate UIViewController subclass that owns and lays out the UISegmentedControl and UITabBarController views.

Also, I'd recommend embedding the UISegmentedControl in a UIToolBar. That will look a lot better than placing it on a blank view.

0

精彩评论

暂无评论...
验证码 换一张
取 消