简体   繁体   English

设备方向更改时绘制UI组件

[英]Drawing UI components when device orientation changes

When I open any form in my app in Portrait mode and tap on any textfield (keyboard pops up) and then change the device orientation to landscape, page is no longer scrollable to bottom most UI widgets. 当我在纵向模式下在应用程序中打开任何表单并点击任何文本字段(弹出键盘),然后将设备方向更改为横向时,页面将不再滚动至最底部的UI小部件。 But if you open the same page directly in Landscape mode, it works fine 但是,如果您直接在横向模式下打开同一页面,则效果很好

I think idea should be like: 1. Capture the change in device orientation 2. Change the frames of UI components as required 3. Redraw the screen 我认为想法应该是:1.捕获设备方向的变化2.根据需要更改UI组件的框架3.重新绘制屏幕

Please suggest. 请提出建议。

您只需将调整框架设置为横向模式即可。U并未分配内存,仅调整框架...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 当iPhone / iPad的设备方向改变时,如何处理UI组件? - How to handle UI components when device orientation for iPhone/iPad changes? 设备方向更改时调整PDF查看大小 - Resize PDF View when device orientation changes iPhone - UIViewController在设备方向改变时不旋转 - iPhone - UIViewController not rotating when device orientation changes 设备方向到statusBar方向更改 - device Orientation to statusBar Orientation changes 设备方向更改时,UIWebview中出现黑条 - Black bar appearing in UIWebview when device orientation changes 设备方向更改时,自定义键盘高度不会更改 - Custom keyboard height doesn't change when device orientation changes 设备方向更改时,图像动画会自动停止 - Image Animation stops automatically when the device orientation changes 设备方向更改时,自定义UIView不会旋转 - Custom UIView does not rotate when device orientation changes 窗口子视图在设备方向改变后不旋转 - Window subview not rotating after orientation of the device changes 当用户更改设备方向时,如何仅旋转导航栏而不旋转视图? - When the user changes device orientation, how to rotate only the navigation bar and not the view?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM