Coder Social home page Coder Social logo

custom-tabbarcontroller's Introduction

custom-tabbarcontroller

How to set top left and right corner radius with desired drop shadow in UITabBar ?

alt text


Steps

  1. Add a coustmeTabBarView.
  • Add the cornerRadius to coustmeTabBarView.
  • Add the shadow to coustmeTabBarView.
  1. In viewDidLayoutSubviews make the coustmeTabBarView frame equal to tabBar frame.
  • In viewDidAppear Adjust the safe area to the height of the bottom views.
  • In viewDidAppear Adjust the safe area insets of the embedded child view controller .
  1. Add private func with name addcoustmeTabBarView .
  • In addcoustmeTabBarView make the coustmeTabBarView frame equal to tabBar frame.
  • In addcoustmeTabBarView addSubview coustmeTabBarView to view.
  • In addcoustmeTabBarView bringSubviewToFront tabBar to view.
  1. Add func hideTabBarBorder (optional).
  • In hideTabBarBorder make the tabBar background Image & tabBar shadowImage to empty image .
  • In hideTabBarBorder make tabBar clipsToBounds = true.
  1. Add func addcoustmeTabBarView & hideTabBarBorder to viewDidLoad

custom-tabbarcontroller's People

Contributors

mohammed-abuamra 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

Watchers

 avatar  avatar

custom-tabbarcontroller's Issues

Toggling Custom View

Hi,

Thank you for this repo, has helped ton!

I was wondering, in the instance one might hide/show the tabBar when a view controller is pushed/popped via an embedded navigation controller, what is the best way to manage the custom background subview behind the tabBar?

I tried doing a simple .isHidden = true/false when pushing/popping and it didn't look that great...I also notice the tabBar item images themselves flicker.

Any guidance would be appreciated!

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.