UIDatePicker
カウントダウンタイマーモードがあります。UIDatePicker
デフォルトでは、自動サイズ変更はサポートされていません。そのため、横向きに合わせてサイズを変更するようにフレームを手動で設定しました
- (void) resizeDatePicker: (UIInterfaceOrientation)orientation
{
if (UIInterfaceOrientationIsPortrait(orientation))
{
self.timePicker.frame = CGRectMake(0, 44, 320, 216);
}
else
{
self.timePicker.frame = CGRectMake(0, 44, 480, 162);
}
}
カウントダウンタイマーを除く他のすべてのモードで動作します。カウントダウンモードでは、はっきりと表示されません。