How to use the UIPickerView on the iPad? - ipad

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:
A full-screen view loaded by the parent view with the UIPickerView directly in it (looks weird)
A modal view which is slightly smaller to put over the parent view and a button to load the UIPickerView separately.
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.
Same as 3 but with a button, as in the Calendar.app, 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?

Related

Which UI element is suitable for drop down filter in iOS app?

Right now i am developing app. One of it's ViewControllers has tableview with list of blog posts. I want to put some control so user can select blog's categories and then app will show posts only from those selected categories.
I thought it would be nice if there will be "filter" button in top right corner of my app's viewcontroller. After pressing it dropdown list of category appears and user can select categories.
What custom UI element can handle it?
Really there's a ton of options at your disposal, not including all the custom elements you can probably grab from GitHub
For an iPad, you can use a UIPopoverController https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIPopoverController_class/index.html
Depending on the number of filters and the style of the design, a good starting point could even be a UIActionSheet.
If you want to do something really fancy, you could have a second UITableView hidden underneath by your main UITableView containing the blog posts, and then when the "Filter" button gets hit you can animate your blog UITableView slightly over revealing your filters menu (maybe even shaded slightly darker to give a feeling of depth to the app)
I searched for a while and can recommend CZPicker https://github.com/chenzeyu/CZPicker because it very nice and easy picker view for iOS that supports iOS 7 and is well working not only iPhones but whit iPads too.

Is there any way to make a custom table view cell look like a button in Xcode 6+?

I'm trying to create a Table View Cell array and have the name displayed in each table. The tables will look like what you see on the home screen of the Evernote app (shortcut, tags, places, notebooks etc.) and each one will access the next screen when tapped. How do I go about doing this? Novice app developer.
This is an image of the result I'm trying to get.
That is a basic cell with transparent background and other views (and images, layers, etc.) added as subviews.
For the other things I suggest to study how UITableView works and how to push a UIViewController using a UINavigationController.
In general you should study iOS and Objective-C from zero.

ios cocoa: How to adjust the size of the popover depending on the number of rows in uitableview

This is related to this question
ios filter options similar to the apple store (dropdown list)
I tried using a uitableviewcontroller instead of a pickerview as I couldn't understand how to use the picker view if I need it popping out (any info on it would be appreciated).
Now this is what I did.
I have a VC that calls out a "FilterVC". I only have one FilterVC that is called by 3 different "filter buttons", and I will just populate the VC depending on the button. The issue is, one button might have just 2 items that is needed to be shown, another one might containg up to 50. Was wondering how do I adjust the height of the popovercontroller that contains the uitableview? Also, is this the right way in dealing with popovers, 3 segues connected to one VC??? (It needed an anchor point)
Here's what it looks like
As a follow up question:
Is this the right way to do it on an ipad? I feel like most people prefer the uipicker. The guy that answered my first question said it's more of a design thing. Now since I'm no designer, as a user, do you think uitableview is more appealing?
Thanks for your time!!
In the view that you're showing in the popover, set self.contentSizeForViewInPopover as soon as you know the size and before the view is displayed.
The main benefit of using a table view over a picker is that it has a scroll indicator so you can see how long the list of options is. Also obviously that you can control exactly how the list is displayed. So the table view should be better if it fits in with your UI style and particularly if the list of options is long.

How to create UIView like IMDB app

I'm trying to recreate a view.
I've seen in the IMDB app and have no idea how to do the same thing.
I'm fairly new at app building, so any advice would help.
In the IMDB app when you select pics of an actor, you get a grid view of photos.
If you tap one, it goes full screen.
If you tap full screen pic, 2 semi-transparent bars appear at top and bottom overlapping photo.
These bars contain buttons and text.
How would I recreate this in my own app? Is it a special view? Modal views I know appear from bottom and fill whole screen.
Can anyone help me?
This question is far too vague, you need to attempt this and post more specific questions as you run into problems, but here's some high-level insight to get you started: (Mind you, I haven't seen the IMDB app)
A grid view of photos could be done with a UITableView or a UICollectionView (either in a full size view controller, or placed into a UIPopoverController for iPad), and when someone taps on one you could launch a new view controller that consists of simply a UIImageView filling the screen (you could do this as a full-screen modal). In any case, this view will need to have 2 views (with backgrounds set to alpha < 1.0) which will contain your buttons and text. You will set those views to hidden until the user taps on the full screen image (which you can use a UITapGestureRecognizer for).
Take a whack at it yourself, and when you run into specific issues, post them here and the fine knowledgable people here at SO will be glad to help you.
You can show a modal view without having them come up from the bottom. pushViewController:animated:(if you're using a UINavigationController),presentModalViewController:animated:,presentViewController: animated:completion: all have a BOOL option to turn animated on or off. They probably just turned the animation off.

Display search results in full screen with a custom control

I need to display search results for my custom control and I'm not so sure what is the best way to make this configurable.
Basically the control is similar to the UITextField but with more visualization. When the user enters some text to the field, the control would enter full screen so that the search field is on top and the results are displayed beneath. This would be very similar way to address search in Apple's Mail.app (see the attached picture).
The issue here is what would the "full screen" mean on an iPhone. If the view is presented from a table view cell, the parent view's frame is not good. The window's bounds do not work as I want to keep the navigation bar visible if there is one. Also, the full screen would be different with the iPad. With the iPad, I think I could use the pop over.
I was thinking if the controller using my custom control would provide the bounds (a delegate method perhaps?) but that feels somewhat cumbersome.
Any ideas would be appreciated.
Update:
So far I've come to a conclusion that the iPad and iPhone versions of this have to have their own specializations of the results display. On an iPad, the popover is quite trivial to implement. On an iPhone, I really can't figure out the proper way to determine the bounds for the expanded control (the text field and results table).
It is hard to describe the problem, but all I'd really need is means to expand the control to occupy some bounds (in most cases the space between the keyboard and navigation bar).

Resources