简体   繁体   中英

How do I set the default tab for tab bar controller

I want to change default tab bar with storyboard. I don't want to use any swift/object-c code.

Is there any solution?

Do the following:

  1. Select the Tab Bar Controller you want to change
  2. Go to the Identity Inspector in the Utilities panel
  3. Add a new "User Defined Runtime Attribute"
  4. Set Key Path to "selectedIndex", Type to "Number", and Value to 2 (since you want the third tab (index starts at 0)

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