Coder Social home page Coder Social logo

dhruvikdhanani / smoothtabbar Goto Github PK

View Code? Open in Web Editor NEW
19.0 1.0 5.0 458 KB

SmoothTabBar is inspired from SmoothBottomBar. Thus, I designed this for you.

Swift 100.00%
smoothbottombar smoothtabbar tabbar tabbarcontroller tabbatanimation smooth ios xcode swift pureswift

smoothtabbar's Introduction

SmoothTabBar

Installation

  • Drag & drop source folder in your project directory.

1) Create TabItem Model like below that return [ViewController]

  • TabItem model return Tab with Image, without Image & tabName
let v1 = ViewController()
TabItem(v1, imageName: "home", tabName: "Home")

// v1 stands for ViewController
// pass image name as String
// pass tabName as String

func smoothTab() -> [TabItem] {
  let v1 = HomeViewController()

  let v2 = HomeViewController()

  let v3 = HomeViewController()

  let v4 = HomeViewController()

  
  let t1 = TabItem(v1, imageName: "home", selectedImage: nil, tabName: nil)
  let t2 = TabItem(v2, imageName: "search", selectedImage: nil, tabName: nil)
  let t3 = TabItem(v3, imageName: "cart", selectedImage: nil, tabName: nil)
  let t4 = TabItem(v4, imageName: "profile", selectedImage: nil, tabName: nil)
  
  return [t1,t2,t3,t4]
}

2) Set AppTabBarViewController as rootViewController in didFinishLaunchingWithOptions

window = UIWindow(frame: UIScreen.main.bounds)
let tab = AppTabBarViewController.init(nibName: "AppTabBarViewController", bundle: nil, smoothData: smoothTab())
window?.rootViewController = tab
window?.makeKeyAndVisible()

Now Boommmmm & Run. Your one star give me a lot inspiration.

  • For More Info... Download Project and check all stuff configuration in AppDelegate

Buy Me A Coffee

smoothtabbar's People

Contributors

dhruvikdhanani avatar

Stargazers

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

Watchers

 avatar

smoothtabbar's Issues

When I present ViewController and modalPresentationStyle = .fullscreen

Thank you for your idea. I think it's great

But I found the problem. You can watch the video

"When I present ViewController and modalPresentationStyle = .fullscreen"

After the controller is dismissed, the TabItem will run back to the first � �index

Video

Code

This is the virus-free URL, please rest assured, thank you

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.