Safari-style UIPopoverController - ios

It is clear that UIPopoverController was not designed to be customized very much. However, is there an obvious way to mimic the UIPopoverController that is presented in mobile Safari (to add a bookmark, for example), that is, a popover with only buttons, no visible inner shadow, and an even background?
The reason for my question is because quite a few applications use a similarly styled popover, such as Reeder and Instapaper. Are these subclasses of UIPopoverController or custom UIViewControllers that mimic a UIPopoverController?

I believe you are looking for UIActionSheet. Here: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIActionSheet_Class/Reference/Reference.html

Related

Bottom toolbar for all screens in iOS

I am new to iOS development and have a question about what component I should be using for a particular UI aspect. The app I am working on has need for a toolbar to go across the bottom and at times to be visible across all screens. This toolbar is going to be used to manage the playing/pausing of some audio files which will play as the user navigates between screens within the app. My question is should I be using a Toolbar, a Navigation Bar or something else to achieve this?
To create such a toolbar you can use whichever component you want. There is no built-in solution on iOS for such a scenario and there is anything in the human interface guidelines that may help you to make this decision.
From my perspective, the problem here is how to make this toolbar visible on all your screens. This depends on your view controllers hierarchy which I know anything about.
Navigation controller
If you use UInavigationController to organize your screens you can use it's built-in toolbar to achieve your goal. The drawback is that the UIToolbar of UINavigationController is per item view controller so you will need to configure it each time a new UIViewController is pushed on the stack.
Containment
The general solution is using the containment API. You can create let's say root view controller of your application which will contain your toolbar and will host other view controllers of your application. For the presentation purpose, I configured it on a storyboard using a container view. You can see it on the image below.
Modal presentations
Neither of above solutions will work when you decide to display a view controller modally. In this case, you will need to make additional effort to put the toolbar in such a view controller.
Other options
You probably won't be able to achieve that using UITabBarController unless you are very stubborn. But if you are new to iOS I don't recommend trying. The same is for UIPageViewController. I'm not sure about UISplitViewController because I have a very little experience with it.

Why should I use a UIToolbar vs using a UIView?

I'm building an instant messenger app in iOS. In particular I'm implementing the UI for a conversation in the most typical way, that is placing an input bar at the bottom of the view (UICollectionView to be clear) that scrolls above the keyboard.
Now, I'm wondering if I should implement this view as a UIToolbar with UIBarButtonItems instead of a custom UIView with UIButtons. What are the advantages of a UIToolbar?
I don't think there is much difference other than convenience. With a UIToolbar you get the following:
UIBarButton items are arguably simpler to add to a tool bar and the
layout is automatic, whereas it is a bit more complicated adding
buttons to a view.
You can set hidesBottomBarWhenPushed on the view controllers to
hide the bar when a view controller is pushed to the nav stack.
Looks more familiar to other apps, including Apple's own apps.
If you use a UIView with buttons you have more flexibility in the appearance but you have to do a bit more work, but other than that I can't really see much difference.
UIToolbar will provide automatic placing of your buttons, saving you from pain of placing those buttons. It was designed specifically for this reason.

UIPopoverController over UIPopoverController

I have a main view with a button, when clicked will open a UIPopoverController, in a UIPopoverController there is another button which should open another UIPopoverController. Is it possible to do?
As per Apple says you should not use UIPopoverController over UIPopoverController,
Instead you can use UINavigationController in side UIPopoverController.
Edit:-
rmaddy's Comment
From the "iOS Human Interface Guidelines": Ensure that only one popover is visible onscreen at a time. You shouldn’t display more than one popover (or custom view designed to look and behave like a popover) at the same time. In particular, you should avoid displaying a cascade or hierarchy of popovers simultaneously, in which one popover emerges from another

iOS7: How does Apple make a navigation controller look like a uiactionsheet in the calendar app

On an iPad, in the calendar app, clicking on the "+" button in the upper right corner presents a view that is imposed on top of the current view like a UIActionSheet spawning from a UIBarButtonItem. However, this view clearly contains a UINavigationController, something that the UIActionSheet cannot do natively.
I'm hoping that Apple has exposed the ability to do this so that I don't have to reproduce it on my own. Can someone provide some insight on how I might approach this concept?
I bet you this is not a UIActionSheet but a UIPopoverController, which can embed a UINavigationController.

How to recreate the 'Cut Copy' Popover on the iPad?

The 'Cut Copy ...' interface popover that displays on the iPad -- I want to create my own popover that is displayed similarly, but I can't determine how theirs was implemented.
It looks like a UISegmentedControl with some styling, which should be easy to implement, but whenever I create a popover and put a view inside it, I can't seem to remove the popover border. Basically, what I want is a popover that has the aesthetic of a UISegmentedControl (e.g. contains the popover arrow as well). This must be easy, as I see it done all over the place. Any suggestions?
The UIMenuController is what I was looking for.

Resources