I want to use the default image of the back button of a navigation controller in
IOS7 elsewhere in my application.
How can i obtain that image?
Programmatically in runtime, you can't.
What you can is
Use extracted elements, e.g. from these sites:
http://avexdesigns.com/ios7-psd-templates/
http://www.teehanlax.com/tools/
Extract it yourself, using Resource extractor
Snapshot the screen and cut it out yourself (most inconvenient option).
Related
What are the constraints/alternatives to place an image that stays on top of all iOS "layers" and windows. Think of it as a lock screen but that still allows you to interact with you phone, meaning browse, answer calls, etc. The image will be displayed in a transparent way (say 40%) and will be launched by an application.
Not really sure what you are asking for but if you are looking for a way to add some code once and it shows everywhere on each of your ViewController then there really is no way to do that.
What you can do is
Use UIToolBar
add buttons to that tool bar
Add that tool bar to each ViewController in storyboard (where you need them)
Create a global function / method that you can call in from any ViewController that has the button actions in it. That way you edit the code once in one place and use it every where.
If you don't like UIToolBar then
you can add your own UIImageView and add a transparent background to it
Add your buttons on the UIImageView. (You will have to add constraints)
then show that on every ViewController
If all this seems to much work then you can use existing controls HERE and see which one fits your needs.
This maybe a good one - FCVerticalMenu
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.
Is it possible to show a BTProgressHUD with a mask without preventing interaction with the tab bar? In other words, can the mask on a BTProgressHUD be constrained to just the tab's currently shown view controller instead of the full window?
BTProgressHUD.Show(status: "Oh hai", maskType: ProgressHUD.MaskType.Gradient);
I am trying to swap out MTMBProgressHUD for BTProgressHUD (because reasons). Unfortunately, when I show a BTProgressHUD with a mask, it will block the user from selecting another tab while it is shown (something MTMBProgressHUD didn't prevent). I definitely need to block any progression/interaction within the current tab's view controller, but I don't mind if the user switches to another tab instead of waiting for the current tab to complete whatever task is requiring the progress HUD.
Here is the full sample code Gist. It is a bit more complex since it includes the tab bar controller and each tab needs to be able to control their own individual HUDs (when this issue is resolved).
After some discussion on Twitter with the creator of BTProgressHUD, it was determined this isn't possible in the current v1.15 release. He suggesting modifying the source to make this happen. I was able to put together the a working version in just a few lines. (It would still need work to integrate with the BTProgressHUD.Show methods that use a shared instance, but I need discrete HUDs per tabs.)
If you build from this fork, you can then create a BTProgressHUD with a parent view (vs. defaulting to the window) which will restrict the coverage of the overlay mask.
var progressHud = new ProgressHUD(View); // ctor overload requires the forked version
progressHud.Show(status: labelText, maskType: ProgressHUD.MaskType.Gradient);
I'm creating prototype apps and need to have a custom carrier instead of showing AT&T/Verizon or whatever actual carrier is on the phone.
I have a fake home screen which the app launches from, but want to have the custom status bar appear for it and the screens after. These are all black statusbars.
Any suggestions for the best way to do this? I created a UIViewController subclass that simply adds an image of the status bar with a label set to the current time, but this won't work if I use a nav bar.
Ideally this is done in a way where I can use the real status bar, but I can put a uiview over the carrier area with the text I'd like. This way I don't have to code in a time and battery icon.
Note that since these are prototypes, I don't need to worry about app store approval.
hide the real status bar and make one with UIView or make a image that looks like it in a UIImageView
After trying a few different ways, I stumbled upon this code that works: https://gist.github.com/guidosabatini/4066796
Haven't been able to test on a live device.
This is what I was using previously (with some modifications): http://www.cocoaintheshell.com/2010/11/custom-status-bar-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.