I am facing a strange issue.
I have a UITableView in the initial UIViewController of the UITabBarController. At first everything is alright, but when I change the tab and come back to first tab the last cell of UITableView is hidden by the tabbar.
How can I fix this?
select your specific ViewController from storyboard then un-check Under Bottom Bar property.
Related
I have a tableViewController with a tableHeaderView. When I'm at the top of the tableView and I scroll the tableView up slightly the tableHeaderView is hidden and can reappear again by scrolling down slightly. This is the default behaviour.
When I push to a viewController then pop back to the tableViewController, the state of the tableHeaderView is preserved. i.e., if it was hidden it remains hidden and if it was visible it remains visible.
However, for some reason when I push to another viewController that has a containerView and then pop back, the tableHeaderView always displays. Even if it was hidden before pushing.
The Issue was that I had checked Hide Bottom Bar On Push in storyboard on the viewController that I was pushing to. For some reason this caused the tableHeaderView to always display when popping back. Unchecking this fixed the problem. Instead the tabBar can be hidden in viewDidLoad of the pushed viewController with the following:
self.tabBarController?.tabBar.isHidden = true
Hope this will help somebody.
When I scroll my TableView, it scrolls over my navigation bar (which I made without using the built in navigation bar for various reasons). See below:
Unscrolled:
Scrolled up:
How do I make it so that the TableView scrolls under the Navbar?
SOLVED:
I checked the "clips subviews" box for the table view to fix this problem.
To me, it looks like there may be an issue with your view hierarchy. Now, I assume that you built your own navigation bar by subclassing UINavigationBar.
In order to get the kind of behavior you need, you should have the following:
UIWindow's rootViewController is an instance of UINavigationController.
UINavigationController.navigationBar = your subclass of UINavigationBar.
UINavigationController.viewControllers[0] = UITableViewController
The UITableViewController.view = your UITableView
I have a TableViewController which comes from a TabBarController. Now my problem is that, the TableView becomes scrollable under my NavigationBar on the top which is transparent and I don't want this to happen.
The second thing is that the TableView's last cell goes below the TabBar which makes it impossible to select the last cell.
Can someone suggest me how to resize the TableView, so that I place it perfectly in between the navigationBar on the top and the TabBar on the bottom.
Thanks in Advance.
Select your UIViewController in storyboard and go to Attribute inspector. In Top Bar combo select Opaque Navigation Bar and in Bottom Bar combo selct Opaque Tab bar.
I have a custom UIContainerView. Inside the UIContainerView is a Controller with a UITableView. The TabBar keeps covering the last cell of my TableView. How do I prevent that from happening? I already tried the suggestions at TableView Showing Behind Tab Bar and Tab Bar covers TableView cells in iOS7 and Tab bar covers UITableView's last cell at all levels: in the VC holding my container view and in the VC of the TableView, as appropriate. I am not having much success. I set the constraints, I remove constraints — still nothing. Help!
I am using iOS7 and Xcode5.
I am using Storyboards, and am interested in inserting a UISegmentedControl in my UITableView controller as such:
When I try to drag one directly from the object list, I can't manage to insert on top of the tableView above the search bar and below the nav bar. I also didn't have any luck dragging it into the view hierarchy panel on the left. I have looked into doing it programmatically as suggested by this SO answer, but do not want the segmented control to be inside the Nav Bar, but rather still in the tableView. How may I go about doing this?
Thanks!
In the XIB, you need to have an underlying UIView with the UISegcontrol, the search bar, and tableviews as subviews.