We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import UIKit import SOTabBar public var home = true class ViewController: SOTabBarController {
override func loadView() { super.loadView() SOTabBarSetting.tabBarTintColor = .clear SOTabBarSetting.tabBarCircleSize = CGSize(width: 40, height: 40) SOTabBarSetting.tabBarHeight = 50 SOTabBarSetting.tabBarAnimationDurationTime = 0.25 SOTabBarSetting.tabBarSizeSelectedImage = 30 SOTabBarSetting.tabBarSizeImage = 30 } override func viewDidLoad() { super.viewDidLoad() self.delegate = self let homeStoryboard = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "HOME_ID") let chatStoryboard = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "CHAT_ID") let sleepStoryboard = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "SLEEP_ID") let musicStoryboard = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "MUSIC_ID") let meStoryboard = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "ME_ID") homeStoryboard.tabBarItem = UITabBarItem(title: "Home", image: UIImage(named: "Home"), selectedImage: UIImage(named: "HomeFilled")) chatStoryboard.tabBarItem = UITabBarItem(title: "Search", image: UIImage(named: "Search"), selectedImage: UIImage(named: "SearchFilled")) sleepStoryboard.tabBarItem = UITabBarItem(title: "", image: UIImage(named: "abc"), selectedImage: UIImage(named: "abcn")) musicStoryboard.tabBarItem = UITabBarItem(title: "Inbox", image: UIImage(named: "Inbox"), selectedImage: UIImage(named: "InboxFilled")) meStoryboard.tabBarItem = UITabBarItem(title: "Profile", image: UIImage(named: "Profile"), selectedImage: UIImage(named: "ProfileFilled")) viewControllers = [homeStoryboard, chatStoryboard,sleepStoryboard,musicStoryboard,meStoryboard] } override func soTabBar(_ tabBar: SOTabBarView, didSelectTabAt index: Int) { print("did Tapped On \(index)") }
}
extension ViewController: SOTabBarControllerDelegate { func tabBarController(_ tabBarController: SOTabBarController, didSelect viewController: UIViewController) { let title = viewController.tabBarItem.title print(title ?? "")
The text was updated successfully, but these errors were encountered:
No branches or pull requests
import UIKit
import SOTabBar
public var home = true
class ViewController: SOTabBarController {
}
extension ViewController: SOTabBarControllerDelegate {
func tabBarController(_ tabBarController: SOTabBarController, didSelect viewController: UIViewController) {
let title = viewController.tabBarItem.title
print(title ?? "")
}
The text was updated successfully, but these errors were encountered: