Coder Social home page Coder Social logo

ahmadalsofi / sotabbar Goto Github PK

View Code? Open in Web Editor NEW
671.0 671.0 72.0 7.44 MB

Light way to add Fancy bottom bar ๐Ÿ“ฒ

License: MIT License

Ruby 8.40% Swift 91.60%
animation bottombar custom fancy ios sotabbar swift tabbar tabbarcontroller

sotabbar's People

Contributors

ahmadalsofi avatar asafbaibekov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sotabbar's Issues

How to hide tabBar other screens

how to hide tabBar in SOTabBar, need to hide other inside screens ex: in UITabBarController we used , tabBarController?.tabBar.isHidden = true

Errors in readme

For example SOTabBarViewController doesn't exist. Maybe SOTabBarController?

Selected Tab Title is not displaying on first launch or when launched app from killed state

Thank you so much for this amazing library.

There are two issues I was unable to figure out solution to:

  1. Selected tab title is not visible (though it is view hierarchy).
  2. How to show title for all the tab bar items despite selected state.
  3. How should I select 2nd Tab on first launch or when launched from killed state.

Added image for the reference of issue #1
Thank you so much!

IMG_1F3D60E55D2C-1

Unable to set selectedIndex

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
    }
} 

RTL Does not support

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

Can't change elements after creation

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!

Can't find SOTabBarView in scope???

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 ?? "")

}

}

Getting error in SOTabBarItem class

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

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.