0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

iOS14のDatePickerUIがホイールじゃ無くなっている

Last updated at Posted at 2020-10-04

概要

iOS14でDatePickerのUIがおかしな感じに

iOS13.3
iOS13.3.png

iOS14
iOS14.png

解決方法

解決策がすでにありました。
https://github.com/react-native-datetimepicker/datetimepicker/issues/285#issuecomment-696384701

UIDatePickerのスタイルをホイールでオーバーライドできるらしい...

AppDelegate.mdidFinishLaunchingWithOptionsに下記を追記

if (@available(iOS 14, *)) {
  UIDatePicker *picker = [UIDatePicker appearance];
  picker.preferredDatePickerStyle = UIDatePickerStyleWheels;
}

react-native-datetimepickerでも同様の対応で問題なさそうです。

最後に

カレンダーポップアップかっこいいのでこっちに移行していきたい。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?