Closed calvinsug closed 7 years ago
Hey,
open var pageTabBarAlignment = PageTabBarAlignment.bottom
property. UIButton
types, so you should be able to add an image and text as you please. :)
If you have any further questions, please reopen or create a new issue. Thank you!
Sorry my confusion, I thought you were asking about TabBar.
open class PageTabBarItem: FlatButton {
open override func prepare() {
super.prepare()
pulseAnimation = .none
}
}
The PageTabBarItem inherits from a FlatButton. So that allows you to do this:
pageTabBarItem.title = "Red"
pageTabBarItem.titleColor = Color.blueGrey.base
pageTabBarItem.image = Icon.cm.add
You can add this code to the PageTabBarController sample project to get the following:
I am spending all month writing documentation, so apologies for the lack of documentation currently.
mmm, if i set image from pageTabBarItem, sometimes my image will cover all of tabBarItem, so the title will be hidden and i can`t change the size and the corner radius. like this screenshoot
i need to show the title like my app screenshoot
Moreover, i need to use button because i need to fill background color for my thumbUp & thumbDown image like this image
Can i apply the same thing to this TabBar? I really love the Highlight animation if i scroll my contentView, it follows exactly where i scroll (but sadly, in my current app, i can only use hidden/unhide the highlight bar)
I am going to bed now, tomorrow I will be able to think about what can be done. I will reopen this issue and place it on the project board for tomorrow. I have another issue, #551 to fix in regards to the PageTabBar... so I can group this all together and come up with something nice.
nice, i will be waiting for your updates :)
Didn't forget about this, I will be working on it today and throughout the weekend.
I will be reworking this all tomorrow. Sorry for any delay.
Hey, forget about the last issue, how to implement this pageTabController without use AppDelegate.swift ?
I tried this but it causes crash in my app when i try to open that PageTabBarController
`import UIKit import Material
class MatchViewController: PageTabBarController { @IBOutlet weak var containerView: UIView!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
open override func prepare() {
super.prepare()
self.viewControllers = [MatchDetailViewController(),ListPlayersViewController(),ChatViewController(),selectedIndex: 0]
delegate = self
preparePageTabBar()
}`
At the current moment, storyboards are not well supported for this type of controller. When I rewrite this, I will see if I can make it happen. This is the next feature to rework, which I am hoping to tackle very soon.