How do you add the stock apple watch loading screen? - ios

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.

Related

IOS App Flow After Pressing A Button

Suppose there is button on first screen of an app which is connecting to second screen(i.e on click on that button second screen will come) and also to a function on first screen class .
Now my question is what is the flow first function||second screen will executes?or both simultaneously will execute.
You have to know that iOS Applications usually use MVC pattern.
So for your example, you have the View (V), containing the design, your button etc..
And the Controller (C), implementing the logic.
The answer is : You can decide which one comes first, just depends how you implement it.
But I don't really understand the logic in your example, can you be more specific.
You should try to make 1 interface element for 1 purpose.

Showing a masked BTProgressHUD without blocking the tab bar?

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);

Component in iOS to make a selector option

I wonder which component is being used to create a selector option like the one used in iBooks where we can adjust the Font Size and also the Theme, but without moving to a new view controller.
In my application I would like to implement it giving 3 small options to the user to choose, but without moving the view controller being presented. Its a small square area with an arrow at the bottom or top side giving the impression where it's coming from. (Let me know if I am not clear with the explanation).
Does anybody know how to use it??
Thank you all in advance
ibooks is using UIView. In that UIView you can add any controls you like. You need to use delegate methods so that I can perform communication between two objects(send message to another object). You will be able to make you custom UIView as controls.

Can I customize UIReferenceLibraryViewController's appearance and "Done" button?

I'm using UIReferenceLibraryViewController to pop up a dictionary to define certain words in my application. It's a very bare-bones controller, and I'm calling it into a smaller view on my main view (akin to a sidebar) rather than with a UINavigationController. As a result, the "Done" button that it includes does nothing when I tap it.
Can I either hide, or customize the behaviour of this Done button?
Failing that, or alternatively, could I get the contents of the definition in some format or other (HTML, XML, NSData, etc.), to display in my own way?
I do have a third-party dictionary in my app already but the definitions it gives are kinda hit-and-miss, and I'd prefer to use the Apple ones if at all possible.
From experience of a DMCA takedown notice from the dictionary provider, you cannot manipulate this view controller in any way. If you do, you are violating contracts and open yourself up to legal action.

iOS system icons and custom buttons

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.

Resources