简体   繁体   中英

Customize More Tab in UITabBarController

I need to customize More Tab TableView (or whatever it is) in UITabBarController.

I have this:

这就是我所拥有的

and I need this:

这就是我所需要的

So I have to:

  1. change nav bar color
  2. disable Edit button
  3. remove empty cells
  4. change Tab Bar More icon
  5. change background color
  6. move cell labels few points to left

When I see this list, it will be maybe much easier to create simple static table view as more tab, but I want to know, if I am able to customize like I need.

Thank you for your time!

Edit: I know how to this things in classic table view or view but I dont know how to access that More Tab in UITabBarController which is automaticcly created, when I have more than 5 tabs.

1a) UINavigationBar changes (top bar) In you AppDelegate paste in:

//make status bar (with time, battery status) white
UINavigationBar.appearance().barStyle = .black

//change color of your navigation bar
UINavigationBar.appearance().barTintColor = UIColor.orange

1b)Change UITabBar color:

//make selected tab orange
UITabBar.appearance().barTintColor = UIColor.orange

2)disable edit button. Create an IBOutlet of the UIBarButton in your ViewController or get the reference to it if you create the UIBarButton programatically Then in viewDidLoad type:

override func viewDidLoad() {
   //...
   //gray out UIBarButton
   myBarButton.isEnabled = false
}

3) remove empty cells Change UITableView style to Grouped in your IB

4) change background color of table view Change background color of your table view in Interface Builder

5) Move labels to the left Create a custom UITableViewCell, drag and drop a UILabel in and adjust the x value as desired.

EDIT: change more tab I guess that you are trying to modify the text of the more tab. The more tab is automatically generated when you have more than 5 view controllers in your tab bar. In order to display the text in the right language, you have to add a new localization to your project: Click on the blue project icon, go in your project settings and add a new language as shown in the screenshot. 在此处添加本地化 If you now run the app on a device with the localization you've added (eg German, French), the text should be displayed in the correct language.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM