Giter VIP home page Giter VIP logo

Comments (2)

ranesr avatar ranesr commented on July 22, 2024

@TCOA I just tried what you were trying to do. And the error you have mentioned above indicates that you haven't added the 6th view controller in the storyboard, that is why you cannot set the tab bar item for index 5.

Can you please try to add 6th view controller and link it with 6th tab bar item and see if this works? It will add last two items in "More" section.

from font-awesome-swift.

TCOA avatar TCOA commented on July 22, 2024

well, it has been awhile (and tons of code since then!) since I did that, though I found a solution that works (not my idea - found it online somewhere - sorry, no reference to where...)

class MyViewController: FormViewController{ required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) // Initialize Tab Bar Item tabBarItem = UITabBarItem(title: "TAB TITLE", image: UIImage.init(icon: .FAMoney, size: CGSize(width: 35, height: 35)), tag: 1) } ......... (finish the class)

Although you have to put this on every ViewController, it allows for setting the icon as well as the title for as many tabs as you have, and not running into the limitation of the array, so this is a much better overall solution (anyway, it worked great for me!)

from font-awesome-swift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.