Drop down menu like the default iPad application menus - xcode

I'm currently working on my first iOS application to run on the iPad, and I've come across a problem. I have been asked to implement menu's similar to the ones in the default applications such as when you click on the "Calendars" button in the top left of the calendars app.
Only issue is, I cant seem to find a standard UI object that looks like these, with the arrow connecting the menu to the button etc. Is this a standard UI component that I should be able to use, or will I have to imitate them by creating a custom object?
Thanks for any help.

That is a UIPopoverController. There isn't an Interface Builder control for this. You need to create one programmatically:
UIPopoverController *popover = [[UIPopoverController alloc]initWithContentViewController:someTableViewController];
See the documentation for more information and sample projects, specifically ToolbarSearch:

Related

Custom Navigation with Xamarin.Forms

I’m working on an application for Android and iOS, which requires a certain flexibility for one or two views. That’s why we created & implemented a service that translated a basic list of objects into a user interface for both iOS & Android. But now that Xamarin.Forms is released, we decided to replace our service by the one Xamarin provides. I did succeed in creating the views with Xamarin.Forms, resulting in better looking & smoother running pages. But my problem lies in the navigation of it. Here is a little drawing on what I would like to achieve:
I would like my app to start an activity that starts with a custom fragment. After clicking a button on this fragment, I would like the page I created with the Xamarin.Forms api to be added to my current navigation stack! Once the user is finished with the Xamarin.Forms page, it navigates to a second custom fragment, all that without breaking the navigation cycle. Does anybody have an idea on how I can achieve this?
For the iOS developpers: replace Activity with NavigationController & Fragment with ViewController
Take a look at CarouselPage for Xamarin.Forms' own approach. It doesn't look like that's what you need but you can also look at its source code and maybe make a custom renderer yourself.
You may also want to take a look at MVVM
As for the easier/hackier way you'd want to make a button on each page and when the button is tapped execute Navigation.PushModalAsync(nextPage) - there won't be a "< Back" button any more, you may need to implement that yourself if you need it.
If by your meaning of 'current navigation stack' is for using the native Navigation of each platform, then remember that you don't have to use Xamarin.Forms' Navigation Model and functions such like PushAsync.
If you prefer to do Navigation with code specific to each platform then you can do this the same as normal. Just create your stub pages in each platform specific project and set the Xamarin.Forms content for each page from the shared project.
From each platform specific stub page (Activity / UIView / PhoneApplicationPage) you could then execute an Action<> call setting on the shared Xamarin.Forms page to help with the navigation, or alternatively, hook into a custom-event that is raised from the Xamarin.Forms** page back to the platform specific stub page to allow you to do navigation from there.
Like Sten mentioned there won't be any 'Back' button so you will most likely have to do that yourself.

Should a non-document based app use an application modal dialog or sheet?

I have a single window based cocoa application. It does not have any documents etc. Essentially it is a utility app. I need to show a modal dialog box, basically a connection box to which has an ip, port, connect controls.
I read somewhere that modal dialogs are not recommended in cocoa based apps. Is that correct ? So should I use document based dialog ? I am quite confused about it, any guidance on that subject would be appreciated.
Modal dialogs can get lost in presentation (showing up on the wrong desktop/space, full screen issues, etc). Sheets tie into the window, so they always display properly.
Full guidance is available in the Human Interface Guidelines https://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/Windows/Windows.html#//apple_ref/doc/uid/20000961-TP9

StatusBar App - Cocoa

I saw this guide: http://vimeo.com/17110202
And now I want to upgrade this app and to use more options besides Menu.
I thought to myself that I want to build somthing like Spotlite ( same design )
But I dont know how to use more options except Menu.
Apple published a sample project that shows how to embed NSViews inside NSMenuItems. The basic idea is to send -[NSMenuItem setView:] in order to change the visual representation of a menu item.
As i read, it is not possible to change the view of a NSMenuItem in a StatusBar app

Presenting multiple views sequentially - OS X

Following up on this question: Kiosk Applications - OS X programming - Multiple monitors
I'm an iPhone programmer just starting out with OS X programming, and I'd like to know how I can present multiple views sequentially.
What I basically need to do is - Have a welcome screen with a button called "Click here to continue". Once the user clicks that button, it needs to completely replace the view with another view presenting a table view of options that the user can choose from.
I actually need to create a couple more screens, but any help on how to get this basic setup can help me get started. The problem I'm having is almost all the mac application source code available on Apple's website seems to be oriented towards single window applications popping up multiple windows for any additional tasks.
Thanks,
Teja
I enjoyed using M3NavigationView from Martin Pilkington http://www.mcubedsw.com/dev
Basically it pushes and pops NSViewControllers on a stack and allows you to animate between them. I am doing this for a quick setup wizard on an app I am working on.
Make a tabless tab view, and put each of your views into one of the tab view items. In Interface Builder, each tab view item will have a view automatically, so you just need to put all of the subviews for that tab into that view.
You can then switch tabs from code—e.g., in response to the “Next” button.

Using toolbar & views on Cocoa

I'm getting started with Mac apps development and trying to figure out some things.
I want to create an app with tabs like Selectable Toolbar from BWToolkit (I try it but still has lots of bugs). And when I click one of its buttons, I want to display a different view.
What are the classes that I need to use?
The Interface Builder toolbar component can have such behavior?
Is there any example on how to switch between views?

Resources