How do you create a UIActionSheet with another View above it? - objective-c

In objective-c, is it possible to create a UIActionSheet with buttons towards the bottom and a View object at the top, with an ImageView and a Label objects inside the View object? If so, any insight to approaching it would be helpful.

UIActionSheet has been deprecated in iOS 8.3. And as your description, UIActionSheet also cannot do what you want.
A recommendation is to create a ViewController and add what you want into this.
Use a modal presentation style of UIModalPresentationPopover and UIPopoverPresentationController to show this ViewController.
Note, UIPopoverController can achieve your requirement, but is has been deprecated in iOS 9.0

Related

NSToolBar for switchign views in storyboards - OS X (Objective-C)

Have been searching quite a while, maybe someone can direct me to a step by step tutorial on understanding how to use NSToolbar to switch between different view controllers and show them below the toolbar. Possibly resizing the window based on the view height and width.
Not familiar with swift, so any objective-c stuff is much obliged. Thank you.
You can use an NSTabViewController with its tabStyle set to NSTabViewControllerTabStyleToolbar.
You can add an NSTabViewItem to the tab view controller for each view controller; with the image of the tab view item set to the image you want in the toolbar.
This can be setup programmatically or in an interface builder storyboard.

Add a UINavigationBar and UIToolbar to modal UITableViewController

I'm creating an app that has a similar layout as the Apple Contacts app. I have created a UITableViewController and embedded it in a UINavigationController using a Storyboard. I then have an add button that opens a UITableViewController in a modal view. I have added a top bar to this view using the storyboard and it works pretty good. The problem is that it scrolls away when you scroll in the table. It should stick to the top.
Do I need to embed this modal UITableViewController in a UINavigationController as well to get the "sticky top bar"?
What's the preferred way of doing this? Just embed using the storyboard or just create one "on the fly" in the prepareForSegue method?
EDIT
I ended up just embedding the modal UITableViewControllers in UINavigationControllers using Storyboard.
Yes, you do need a UINavigationController that contains the UITableViewController to get what you aim for.
Personally, I would prefer creating it "on the fly" as you call it. But that is a matter of taste.
The way to do it in the storyboard is to have your modal view controller be a UIViewController rather than a UITableViewController. Add a view controller, then drag in a tool bar, and position it at the top. Then add a table view to take up the rest of the space below the tool bar. This will work correctly without scrolling with the table view.

Can you use Storyboard without UINavigationBar?

As the title says, I am wondering if/how you use Storyboard without UINavigationBars? How do you disable these UINavigationBars if you just want to make use of storyboard but not this other control it comes with?
Your view controllers will only have navigation bars provided if they're part of a UINavigationController stack. You're not obligated to use UINavigationController.

UISegmentedControl in UIToolbar

I'm migrating an App from iOS 4 to iOS 5 and I find myself stuck. Here's my problem:
I have a UIToolbar that has a UISegmentedControl within. Now, with the old App, I used all the methods of UISegmentedControl, like
[switch removeAllSegments];
but this leads to crash in the new iOS 5 because now the UISegmentedControl is automatically converted in UIBarButtonItem.
How can I solve this situation?
This may not best practice. But i think you have to add subview on UIToolbar and in that subview please add segmented controls. May it work for you.

UIPopoverController buttons beneath a table view

I was looking to implement something like the image below, and really have no idea how it's done and was wondering if someone had a quick design idea (no code is necessary or anything). Is it a footer view for the table view? is it some unknown footer view for a popover controller? Is it some way to integrate a toolbar from the UINavigationController 'into' the popover? I guess I could always create a custom view and display it 'like' a popover. Thanks for any help.
UIPopoverController will actually do a lot of that for you. If you set its content view controller to a UINavigationController, the contents of that navigation controller’s current view controller’s navigation item will display embedded in the top of the popover. I believe setting the view controller’s (not the navigation controller’s) toolbarItems will have the same effect at the bottom.
In this case, it looks like they wrote a custom popover controller; it doesn’t have an arrow attached, and the top of it is shaded a little differently from the standard UIPopoverController. But I’m pretty sure you can use the methods I just described to achieve a similar effect without having to roll your own popover.