iphone keyboard is rotating into landscape while app setting is portrait only

My app's device orientation is set to portrait, however when rotating the device into landscape mode, the app is keeping its portait mode but the keyboard is rotating into landscape mode...Something that is unexpected.

Why is that happening and how to prevent it?

Thanks Jrejory


After not getting any answer and making more researches, I came across this Answer: https://stackoverflow.com/a/6941930/4400274

Because I just needed the portrait orientation in my app the following worked for me :

[[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications];

I put that in my main Navigation Controller's viewDidLoad.

链接地址: http://www.djcxy.com/p/19108.html

上一篇: NHibernate HiLo生成和SQL 2005/8架构

下一篇: iPhone键盘正在旋转到风景,而应用程序设置只是肖像