横向模式下的iPhone UIDatePicker? [英] iPhone UIDatePicker in Landscape mode?
本文介绍了横向模式下的iPhone UIDatePicker?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
iPhone UI Componenet UIDatePicker不支持横向模式?
仅在横向模式下划伤宽度的2/3。
iPhone UI Componenet UIDatePicker does not support Landscape mode? it scratches 2/3 of the width in Landscape mode only.
如何使其用尽全宽(480px)?
How to make it use up full width (480px)?
推荐答案
尝试手动重新设置UIDatePickers的子视图边界,如下所示:
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;
}
}
本文很好地描述了一切:
在横向模式下使用UIDatePicker
Everything is nicely described in this article: Using UIDatePicker in landscape mode
这篇关于横向模式下的iPhone UIDatePicker?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文