开发者

Create an Edit view similar to Contacts App

开发者 https://www.devze.com 2022-12-27 10:56 出处:网络
I have an edit view in my app which is a i开发者_JAVA百科nstance of UITableViewController and contains one cell with a textfield in a grouped table.

I have an edit view in my app which is a i开发者_JAVA百科nstance of UITableViewController and contains one cell with a textfield in a grouped table.

At the moment this cell is at the top of the screen and is firstResponder so they keyboard is visible as well. But in all the Apples apps like the Contacts App when you edit a piece of information like an Email it buts both of its rows in the middle between the Nav Bar and the Keyboard not at the top of the screen.

How do I achieve this effect?

Many Thanks


In IB, on the Size Inspector for the table view, set the Content Inset to say 50 or in code do this:

tableView.contentInset = UIEdgeInsetsMake(50.0, 0.0, 0.0, 0.0);
0

精彩评论

暂无评论...
验证码 换一张
取 消