Use a UITabBar without UITabBarController to control a UIWebView

前端 未结 4 1647
说谎
说谎 2020-12-14 13:12

I want to use a UITabBar to let the user navigate a single UIWebView. Is this possible or would I be better off using a UIToolbar? If

4条回答
  •  执念已碎
    2020-12-14 13:21

    Using the platform style users are familiar with in your application is a good thing, but if you want more flexibility in where you place things and how you set up your hierarchy you might just better go with UITabBar directly and then implement the UITabBarDelegate separately.

    https://developer.apple.com/library/ios/documentation/uikit/reference/UITabBar_Class/Reference/Reference.html#//apple_ref/doc/c_ref/UITabBar

    I always advocate not using UITableViewController and other specialized ViewControllers like UITabBarController because separating everything avoids clutter and makes your applications more flexible.

提交回复
热议问题