开发者

Return height between navBar and keyboard

I have got a tableViewController with one section and one cell.

How can I get the height between the navBar and the keyboard without any toolbar above it?

I tried t开发者_高级运维his code:

self.view.bounds.size.height
but I get the height of the entire view down the navBar...

I'd like to get this size to assign it to the cell and to the textView inside it.

Thanks :)


You can't get the height of the keyboard until it is displayed. You'll need to register for one of the keyboard notifications and then check the UIKeyboardFrameEndUserInfoKey value. This will give you the frame for the keyboard. Use this to adjust the height of your view.

I don't know what happens if you change the rowHeight property on a table that's already displayed, but my guess is that it should do what you want, once you compute the height to set it to.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜