Closed jojonarte closed 6 years ago
You need to use a BottomNavigationController to do that. If you need any further help, please reopen this issue. Thank you!
What property in BottomNavigationController should I use by default I'm getting the same horizontal aligned behavior. I can't reopen btw. This is how the tabItems looks like
I couldn't find a way to make it look as the guidelines https://material.io/guidelines/components/bottom-navigation.html#
Use the BottomNavigationController as a base and here is some sample code that achieves what you are looking for:
import UIKit
import Material
class PhotoViewController: UIViewController {
convenience init() {
self.init(nibName: nil, bundle: nil)
prepareTabBarItem()
}
open override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = Color.red.base
}
}
extension PhotoViewController {
fileprivate func prepareTabBarItem() {
tabBarItem.image = Icon.cm.photoCamera?.tint(with: Color.blueGrey.base)
tabBarItem.selectedImage = Icon.cm.photoCamera?.tint(with: Color.blue.base)
tabBarItem.title = "Photos"
}
}
Still the same on an iPad though.
I need to see an image or get a sample project to investigate. Please send one my way :) Thank you!
I've been trying to find a way to position the title of the tabbar below the icon vertically. Is there no exposed property that does this?