I\'m a beginner in iOS development. My question is: is it possible to position UITabBar at the top and how? I can\'t position my UITabBar at the top of the view.
Swift 5
Add this code to your UITabBarViewController;
override func viewDidLayoutSubviews() {
let height = navigationController?.navigationBar.frame.maxY
tabBar.frame = CGRect(x: 0, y: height ?? 0, width: tabBar.frame.size.width, height: tabBar.frame.size.height)
super.viewDidLayoutSubviews()
}
It works for iOS > 13 and iOS < 13