iPhone UIDatePicker in Landscape mode?

╄→尐↘猪︶ㄣ 提交于 2019-12-19 10:11:07

问题


iPhone UI Componenet UIDatePicker does not support Landscape mode? it scratches 2/3 of the width in Landscape mode only.

How to make it use up full width (480px)?


回答1:


Try to manually re/set the UIDatePickers' subviews bounds like this:

- (void) viewDidLoad {
    [super viewDidLoad];
    for (UIView * subview in datePicker.subviews) {
        subview.frame = datePicker.bounds;
    }
}

Everything is nicely described in this article: Using UIDatePicker in landscape mode



来源:https://stackoverflow.com/questions/2331752/iphone-uidatepicker-in-landscape-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!