Swift Multiple Alert Dialog Fade Out my Interface to Black - ios

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!

Related

How to make a sheet that is partially shown when not presented in SwiftUI? (like the one in the Shortcuts app)

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

Update status bar text colour in real time as view changes

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.

Watchkit App: slider background color

I am surprised no one asked already this question, maybe I am just thinking something wrong. But here it is: I am trying to use WKInterfaceSlider to show some progress. The background of my app is black and I really need the background of the slider to match. It looks really bad with that dark grey default background. Isn't there really anyway to set it to replace it or simply set it to nothing?
I would accept also a no answer, but I would really like to understand why this choice in the APIs.
It seems you are unable to set the background color of the WKInterfaceSlider. You could always do a feature request.
I think the reason behind this is that the user should be familiar with the interface elements regardless of which app he/she uses.
Tips:
You could make your own Slider via a WKInterfacePicker. Where you define the slider as an image sequence. Highly customisable and you could slide it via the digital crown.
Check out this piece of code: Trying to get button to spin in WatchKit

Animation on top of uiviewcontroller like facebook app

The new facebook app has a new feature. There is a little circle in the bottom of a message that means where is the user in the conversation. (hist last seen message).
It is pretty awesome, but i couldn´t figure out how it was developed. I´m pretty sure they created a new cell type, to show where is each user in the conversation. And then, if the user reads it, it just update the table and the user will be in another message that he just read. This would be ok.
But my question is, during this transition, the little circle is animated from the current message to the new position, and the others little circle are animated to make space for the new coming little circle. How is that possible? To animate something on top of a listview?
Thanks in regards,
Can you give me a screenshot of what you're talking about so I can look at it, or give steps to get to the screen you're talking about?
Facebook does some pretty remarkable stuff with iOS. If you want to see some of the crazier things, check out the app Paper that was developed using the Pop Framework. In there you might find some of the UI actions you're looking for.

AlertView? Alert? What is it?

I've seen some cool looking "windows" / "alerts" /whatever they are called. I wish I knew. Here's some examples of them:
These shouldn't be Apple exclusive, since I've seen 3rd party apps use them! I'd like to know what are these windows?
It Custom UIActivityIndicator that you can found in this link
https://github.com/jdg/MBProgressHUD
MBProgressHUD is an iOS drop-in class that displays a translucent HUD with an indicator and/or labels while work is being done in a background thread. The HUD is meant as a replacement for the undocumented, private UIKit UIProgressHUD with some additional features.......
For mor information go to above Link
Thanks :)
These is not apple specific controls. You can create them.
The pop up shown in first image is very easy to make. You'll have to use 3 controls to make it.
Background UIImageView with the image.
UIActivityIndicatory
UILabel with whatever message you want to display.
You just have to load this UIImageView and Animate the UIActivityIndicatory to get this pop up. I've used these pop up in a lot of apps Apple don't object this.
Your first view is a UIProgressHUD. Original Apple HUD is in a private API and it is not recommended to use it.
http://cocoadev.com/wiki/UIProgressHUD
However, numerous implementations have appeared that emulate the original HUD. For one, have a look here:
https://github.com/y0n3l/LGViewHUD
though I am sure Google will give you a dozen similar implementations.

Resources