This might be a beginner question, but I noticed something interesting in the new Apple Music app. When switching from one view to another, the status bar text colour seems to change in real time rather than all at once when the next view loads.
Check out this screen recording to see what I mean:
http://f.cl.ly/items/2A0a3Q3i2O2d2O3u3q1m/statusBar_1.mp4
Closeup: http://f.cl.ly/items/182r3n3Z1m1y0y1W0j2J/statusBar_2.mov
How would I achieve this same effect? For instance, when transitioning to another view controller modally, how would I get the status bar style to change dynamically like this rather than when the next view loads? Is it even possible? Is Apple using some private API, or is it just a really simple trick I'm missing? Sorry if this is a beginner question, but I don't think I've ever seen another app do this.
Nothing you’re missing—there’s definitely no API to do that. I’ve seen a couple of third-party apps do something similar, probably by finding the status bar window, snapshotting it, and doing clever things with the resulting image, but that’s pretty fragile. As always, if you’d like an API for something, you should file an enhancement request.
Related
While many UI-elements are easy to create in SwiftUI, there´s one I'm struggling with. I don't know what it's called, but I'm talking about the bottom-search bar which turns into a full-blown sheet akin to the one shown when calling .sheet(isPresented:) when dragged up.
Here's a visual:
Screencap of the mentioned UI-element in the Shortcuts app
I realize there's a good chance this isn't possible yet, but I thought asking was worth the shot :)
Goodmorning all,
In some cases I need to present a lot of alert dialog (overlapped on each other). At the moment i can't find another way to do this because i need to take trace of each user's answer for each question in my dialogs.
So, after 5-6 dialog overlapped i've something like this:
my interface is faded out till to black, there is a way to avoide it?
Thanks all in advance.
That happens because the alert has a slight transparent black background which appears on top of the view. The things is since you add a lot of them, at this point this translucent backgrounds they get combined and you get the non-transparent black one.
One alternative would be to not present the alerts all at once but in sequence. So when the first one is dismissed, you present the next one and so on.
Another alternative would be to write your own custom alerts. Then you could control the background as would be fit your application.
However, it does not seem you are using the alerts for what they are supposed to be used, which is errors or messages the user must know. Maybe there is another solution for you application, maybe using a form or something similar. They are quite an intrusive way to interact with an application, so they should be used accordingly.
Hope this helps and you get to figure out the best solution for your project. Good luck!
Would like to see if my app name will fit when the watch isn't charging, which I'm assuming wont be there when in use.
See image: http://imgur.com/ctHAQxy
Short answer is you can't.
However, during transitions from controller to controller, or when reloading root controllers etc., the entire status will only display the title, and then the status bar will animate back to it's original state.
You may be able to setup a test using the same title across multiple controllers to see make an educated guess as to what it's going to look like.
When the iPad first came out, I recall that Apple frowned upon the use of a Split View inside of Tab Bar Item View. Whether or not they rejected applications that used this design I don't recall or know anything of.
Is this design still frowned upon by Apple? If you create an application that uses this design will it be rejected by Apple? I know there are third-party API's now that help you write applications that utilize this design pattern which leads me to believe that Apple no longer cares, but I just wanted to be sure about this.
If anyone can shed some light on why Apple frowned upon this design that would be helpful because I don't understand what about this design was an issue for Apple.
I can't find the citation at the moment, but there used to be a section in the HIG that said that you must not do this, and then they changed it to one saying you should try to avoid doing this. So I think you're clear, as long as the design makes sense. Sadly I can't find where that phrase occurred — maybe it was taken out all together.
At any rate, there's nothing in the HIG under either tab bar or split view that says you can't do what you want.
I just stepped over this, too.
This also didn't work in the Interface-Builder prior to 5.1.
But i just tried today and recognized that you can simply add a relationship from a tabbar controller to a splitview inside interface builder (this did not work before).
However, only the detail view shows up when running the app and select the tab containing the splitview.
edit: This seems to work out very easy if you compile for 5.1. There seems to be a change in handling Splitviews.
Just try it out:
In your Storyboard, create a Tabbar Controller
add a Split View Controller
Create a Reference from the Tabbar Controller to the Split View Controller
Now you need to create your Master and Detail Controllers
I am not finished with the implementation yet, but hope this helps.
I'd like to use this effect (not necessarily blue) when I'm synching my app to my server. I've searched the interwebs and apple dev forums but to no avail.
Another way to do this (though it gives you very little control over how the double status bar looks) is to simulate an audio session. See the following question & answer: SBStatusBarController instance
There is no way to do this nicely as Apple does this. There are two ways to do at least something close to this:
You can try to set status bar style to UIStatusBarStyleBlackTranslucent and plea a little bit with background images under the status bar that will affect a color a little bit.
You can take a look through the code by following links — http://www.cocoabyss.com/uikit/custom-status-bar-ios/ and https://github.com/myell0w/MTStatusBarOverlay/ this two code samples implements an overlay above the status bar that fools a user. Achieved result maybe pretty close to what you show in your screenshot.