开发者

How to use the UIPickerView on the iPad?

开发者 https://www.devze.com 2023-03-14 00:11 出处:网络
Using the UIPickerView on the iPhone is quite simple as it has the right size on the screen, however on the iPad it looks rather strange. I\'m wondering how to display it in the best/most user-friendl

Using the UIPickerView on the iPhone is quite simple as it has the right size on the screen, however on the iPad it looks rather strange. I'm wondering how to display it in the best/most user-friendly way possible?

The purpose of the view is to display and edit meta data for an item. I won't need the full screen for it. The picker is used to determine the language the text is written in and is populated from a plist.

As I see it, there are four possibilities:

  1. A full-screen view loaded by the parent view with the UIPickerView directly in it (looks weird)
  2. A modal view which is slightly smaller to put over the parent view and a button to load the UIPickerView separately.
  3. A UIPopoverController which has the same size as the UIPickerView, this will however cause problems with the amount of fields I need on the screen.
  4. Same as 3 but with a button, as in the Calendar.ap开发者_如何学Gop, which would save some space.

Did I miss something? What would you suggest?


What about a popover controller with your fields, wrapped into UINavigationController, and one of those fields navigates to another screen with just the UIPickerView? Kind of like the alarms are edited on the iPhone.

Also maybe UIPickerView is not the right tool to choose a language. What about just navigating to a list of languages with checkmark selection, not to a screen with a picker?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号