ahmadalsofi / sotabbar Goto Github PK
View Code? Open in Web Editor NEWLight way to add Fancy bottom bar ๐ฒ
License: MIT License
Light way to add Fancy bottom bar ๐ฒ
License: MIT License
how to hide tabBar in SOTabBar, need to hide other inside screens ex: in UITabBarController we used , tabBarController?.tabBar.isHidden = true
Hi, I am not able to hide bottom bar view after push from tabbar controller
Hi all.
I want to set color Title SOTabBar
Can u help me?
For example SOTabBarViewController doesn't exist. Maybe SOTabBarController?
Thank you so much for this amazing library.
There are two issues I was unable to figure out solution to:
Added image for the reference of issue #1
Thank you so much!
i am trying to set initial index to '2' but it's not working.
I even tried to change the selectedIndex in the library but its not working.
func setUpTabBarController(){
self.delegate = self
self.selectedIndex = 2
let homeStoryboard = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "HomeViewController")
let searchStoryboard = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "SearchViewController")
let recordStoryboard = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "RecordViewController")
let notificationStoryboard = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "NotificationViewController")
let profileStoryboard = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "UserProfileViewController")
homeStoryboard.tabBarItem = UITabBarItem(title: "", image: UIImage(named: "home"), selectedImage: UIImage(named: "home_Selected"))
searchStoryboard.tabBarItem = UITabBarItem(title: "", image: UIImage(named: "search"), selectedImage: UIImage(named: "search-selected"))
recordStoryboard.tabBarItem = UITabBarItem(title: "", image: UIImage(named: "record"), selectedImage: UIImage(named: "record"))
notificationStoryboard.tabBarItem = UITabBarItem(title: "", image: UIImage(named: "notification"), selectedImage: UIImage(named: "notification-selected"))
profileStoryboard.tabBarItem = UITabBarItem(title: "", image: UIImage(named: "profile"), selectedImage: UIImage(named: "profile-selected"))
viewControllers = [homeStoryboard, searchStoryboard,recordStoryboard,notificationStoryboard,profileStoryboard]
}
i also tried to set the index in the podfile but it's not working for me.
open class SOTabBarController: UIViewController, SOTabBarDelegate {
weak open var delegate: SOTabBarControllerDelegate?
public var selectedIndex: Int = 2
public var previousSelectedIndex = 0
public var viewControllers = [UIViewController]() {
didSet {
tabBar.viewControllers = viewControllers
}
}
Hi,
Its a great experience after adding your library into my project. but i need to give support for RTL language now. but seems i stuck there.
can you please also provide support for RTL language as well ?
Thank you in Advance
I want to move selected circle on orientation. which is not happening right now.
let imagev = UIImageView()
imagev.image = UIImage(named: "star_icon")
var mangeAppt = self.tabBarController?.tabBar.items![1]
imagev.frame = CGRect(x:0,y: 0, width: 5, height: 5)
imagev.startAnimating()
self.tabBarController?.tabBar.bringSubviewToFront(imagev)
self.tabBarController?.tabBar.addSubview(imagev)
For example I need to show "login view controller" and if user input login and password then I need to show "profile view controller. How to do that with this control?
I try to overwrite viewControllers
property but it seems your control appends changes instead of replacing
And of course tabBar
property is made private which doesn't allow to fix this bug externally. Even if I find it as a subview - each its method is marked private!
Men if you develop a public library for using with cocoapods use private
in exception cases only!
isUserInteractionEnabled in SOTabBar
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 ?? "")
}
}
Fatal error: You should set image to all view controllers: file /Pods/SOTabBar/SOTabBar/Classes/SOTabBarItem.swift, line 35
2020-03-13 Fatal error: You should set image to all view controllers: file /Pods/SOTabBar/SOTabBar/Classes/SOTabBarItem.swift, line 35
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.