iOS system icons and custom buttons - ios

i'm working on my first app and the problem a have is that the application interface design is quite customised, (even though it is a tab bar based app). now in one of the view controllers i need to present the user with the print interaction controller to print images. the thing is i don't use a navigation bar or a toolbar system or otherwise. i have managed to attach a target action method to a custom button. however, apple states that the printing interface should be presented by a system button (the one that looks like an arrow, kind of). question is: is there any way of putting a system icon inside a button that is not inside a (bar)?, or would it be ok to somehow tell the user (with an overlay or something) that tapping the button i'm using (the button is a red ribbon coming down from a picture frame) they will get the printing options?

Apple says:
Although the print button can be any
custom button, it is recommended that
you use the system item-action button
shown in Figure 6-1.
I'd interpret that to mean that you can use your own button if you want to.

You might want to consider having a toolbar at the top of the view for this particular tab. Just appearing on this tab. This would make the issue moot.
You could also, have the tool bar "slide in" and "slide out" from the top to provide access to this (and other?) actions. A single or double tap could instigate such an action.
Unfortunately, Apple doesn't expose the images for the custom bar button items in any reasonable manner. If you'd like access to them, I suggest using the bug reporter system at Apple's developer site to request that.

Related

How do you add the stock apple watch loading screen?

In many apple watch apps during Apple's "Spring Forward" when the apps pushed to another interface controller, they looked like this:
Then the interface controller would load
I am perfectly aware that this screen appears when the app starts up, but I want to show the stock loading screen after I push an interface controller
**I do not want to use image sequencing to achieve this
Also apple has sample code you can download called "Lister" that shows the loading symbol after every interface controller push, without image sequencing
How can you achieve this??
TL;DR
Either use the system behavior in the "Hides When Loading" checkbox under the Attributes of the Interface Controller and let the system manage it like in the example code or...
Create your own interface controller that will have to use a image sequence.
Longer Explanation
Your confusing what's actually possible. The stock loading screen isn't something that you can actually call nor manipulate. It's the default loading animation for a controller that hasn't finished awakeWithContext:. That's why you see it in the example code.
You can actually control it in the storyboard. Select or deselect the "Hides When Loading" checkbox under the Interface Controller section of the Attributes of the Interface Controller.
However, if you want control over when/where, you will have to create your own and yes that does mean you have to use an image sequence. There really isn't another way to do that animation currently without an image sequence.

How to get square hovering over button iOS

Sorry, the question isn't really clear, but basically I want a button or a label or something like that that says "notifications" and a small red square (like Facebook) that displays the number of notifications that user has (if they have any). How would I go about doing that? I'm not too advanced with UI design in iOS yet. I'm coming from an Android background so feel free to use any comparisons if there are any.
What you are referring to is called a badge. Some native controls have them (tab bar buttons come to mind), but most do not.
If you are using a tab bar controller, you can set the badge value from the UIViewController. Something like this:
[[self tabBarItem] setBadgeValue:#"1"];
If you are looking to implement a custom one, it could be easily accomplished with a UIView and a UILabel. Add a badge view to what ever view based control you are creating, then add a label to that badge view and set its text. There are probably lots of third party ones floating around the web already though.

UIView/ViewController name [picture]

What is the name of the UIView/UIViewController in the left upper corner of the attached picture?
And more general question: where could an iOS developer find full and illustrated list of all available UIViews and ViewControllers?
Sorry, don't have enough reputation to attach the picture, please follow the link: image with iphone interface mockup.
That isn't a controller, it's a UIActionSheet. Also, the XCode documentation is pretty useful for browsing through iOS classes. To get to it, press the button in the top right-hand corner of XCode, labeled "Organizer".
More on UIActionSheet, you declare one by calling:
initWithTitle:delegate:cancelButtonTitle:destructiveButtonTitle:otherButtonTitles:
Make sure to set your controller as the delegate and to implement:
actionSheet:clickedButtonAtIndex:
to specify what should happen when a button is clicked.
To show the Action Sheet initially, it has a bunch of showFrom... methods to specify where it will appear on the screen (for iPad, at least).

Editing toolbar in Xcode 4.6 - unable to add Bar Button Items

I am attempting to add a toolbar as an input accessory, and as such have added it via xcode storyboard editor to the view controller (and not within the view). This was as specified in this tutorial(which seems to be written for an earlier version of xcode): reference
My issue: "8.) Now we need to open the toolbar item itself. Double click Toolbar in the document window."
This is no longer valid behavior in Xcode 4.6 it appears, so I ask you: how do I add button items to a toolbar? I would prefer to avoid doing it programmatically (Still reasonably new to xcode development and normally make my GUIs with storyboards) but if I have to, I have to.
Many thanks!
If you're doing what I think you are doing, adding UIBarButtonItems to a UIToolbar, then you simply drag a Bar Button Item out to the toolbar.
However, I would assume that what they mean when they say 'double-click' is not what people normally think of when they think double click. Try double clicking slowly this often does the trick.
Found the issue - it was appearing behind the UIView. However you dont ever need to graphically interact witha toolbar, you can just drag-and-drop controls onto it in the sidebar. If there is a need for more info on this message me or vote up.

Facebook iPhone application: root view animation style

I'm working on an application that has the same layout as Facebook. I have several icons on the home screen and would like to to make my viewController appear like when one of the icons are tapped.
Any idea on how it works?
Are you asking how to make a view appear in the standard way when the icon is tapped? ie how to make a button which is an image
Or
are you asking how to make the view expand out like they do in the facebook app?
If your are asking the first one, you need to drag on a button in interface builder, then select it, in the button attributes window, in the first tab, in the 'type' drop-down (which is default to rounded rect), choose custom. then set either the image or background to your image (see whatever looks better). You can then link it up like a normal button with an IBAction.
If you are asking the second question, how do you make the views expand out and shrink back, then check out my tutorial:
How to make expanding/shrinking views on iPhone SDK
Adam

Resources