Custom Tabbarcontroller Save

custom-tabbarcontroller

Project README

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
Open Source Agenda is not affiliated with "Custom Tabbarcontroller" Project. README Source: mohammed-abuamra/custom-tabbarcontroller

Open Source Agenda Badge

Open Source Agenda Rating