UITableView cell needs double click - swift

I have a UITableViewController. Each cell in the table has a segue to present another UIView modally.
When I click on a cell in the UITableView, it brings up the other UIView.
But I put the UITableViewController in a Navigation Controller, nothing happens on the first click to the cell, and the UIView shows up on the second click.
Does anyone know why putting the UITableViewController in a Navigation Controller cause the first click to do nothing?
EDIT:
It seems that the focus is not initially on the table view. When I first click the cell, the focus on the tableview, and the second click goes to the cell.
I used storyboard.
Here're some screenshots:
This is the setup of the views
This is how the table cell is connected to second view controller

Related

swift uitableview moves up after unwind segue

I have a custom uitableview inside a uiviewcontroller. A segue to another tableviewcontroller will happen every time a cell is tapped on. I also have a back button on the other tableviewcontroller which allows users to segue back to the original viewcontroller. The problem happens when the unwind segue happens. After I get back to the original viewcontroller, the first cell of the tableview would be hidden right below the navigation bar, so the tableview bounds have changed I'm guessing? I have been looking everywhere but am unable to find a solution, please help! thanks in advance!

Call segue on tap of UITextView swift?

I have a UITextView embedded in each cell of my UITableView. Clicking the cell calls another view controller but clicking the textview inside the cell doesn't (but I want it to). How can I fix this?
Uncheck User Interaction Enabled in the storyboard under the View category of the Attributes Inspector for your UITextView.

pushViewController from Prototype Cell

Quite simply, how do I push a new view controller from a prototype cell within a storyboard? I have a tableView reading data from a plist file, and its one default prototype cell on the storyboard. Then, I have another view controller in the storyboard I need to link to the tapping of a cell on the table view. How can this be accomplished?
Simplest thing would be to Ctrl-click on the prototype cell and drag the line onto the view controller that you want to transition to. It should prompt you for the type of transition—"push" transitions cause the new view controller's view to slide in from the right; "modal" transitions cause the new view to slide in from the bottom. Assuming you're using a navigation controller, the navigation bar should configure the back button automatically. You shouldn't need to write any code to achieve the behavior described in your question.
In your storyboard, link your prototype table view cell to your view
controller with a segue. Make sure to give the segue an identifier in
its Attributes Inspector.
In your TableViewController class,
implement - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
In the prepareForSegue: method, get the NSIndexPath of the row the user tapped with [self.tableView indexPathForSelectedRow]
Use the indexPath to get whatever data you need from your plist. Configure the view controller by using the destinationViewController property of the UIStoryboardSegue parameter passed into prepareForSegue:.

trying to create a login view with grouped tableview

Trying to create a login screen like the one in the facebook app. Trying to do it with a grouped tableview with a button underneath. If I choose static cells I must enclose it in a tableview controller, but I don't want it to a table view controller since I want to put in other elements in the view. If I set it to Dynamic prototype the don't show up at all.
I'm doing this in the Storyboard interface.
Right now it looks like this in Storyboard:
ViewController
View
TableView
Table View Cell
Table View Cell
Button
Thanks.

Last row in UITableView is obscured by UITabBar

I have a UITabBarController that has a list of UINavigationControllers assigned to the 'viewControllers' property.
Each UINavigationController has a custom UIViewController as its 'rootController' and this custom UIViewController loads its 'view' from a .xib file. This 'view' contains a UITableView (and some other controls that are displayed when the data for the UITableView is first downloaded).
It works fine to begin with - I can see the table view for the first view controller when the first tab is selected, changing tabs displays the other table views - all is good.
My problem is, when I select a row on one of these table views a new custom view controller is instantiated, told to hide the bottom bar when pushed and then is pushed on to the navigation controller. Again - this works as expected. I see the new sub-view and the tab bar is hidden.
The problem is when I return to the previous view, the final row in my UITableView is now obscured by the tab bar (which has correctly reappeared). It seems the process of hiding the bottom bar and then showing it again when returning to the previous view has confused things.
Has anyone encountered this? Any idea what I might be doing wrong?
Check that your UITableView has not the UIViewAutoresizingFlexibleHeight (in IB, see the picture below).
alt text http://www.quicksnapper.com/files/5161/20375276064A0C11D2C33A4_m.png