benlau / quickios

QML Theme and Component Library for iOS
Apache License 2.0
166 stars 37 forks source link

Question AlertView #1

Closed mikeeeeeeeeeeeeeeee closed 8 years ago

mikeeeeeeeeeeeeeeee commented 8 years ago

Hi can i close an AlertView?

Something like "alert.close();" in: https://github.com/benlau/quickios/blob/master/examples/quickiosexample/alertview/AlertViewDemo.qml

benlau commented 8 years ago

It is not implemented. Why you need this function? Since a dialog is usually used to draw attention and need user response before close.

mikeeeeeeeeeeeeeeee commented 8 years ago

the alert shows that the app is updating. When the update is ready, the alert should close.

Or i could change the text from "Updating ..." in "Update finished" and the button text "Cancel" in "OK", but the text did not change. I tried this with the following code:

alert.title = "Update finished";
alert.buttons = ["OK"];
benlau commented 8 years ago

iOS do not allow to change the text after the alert view is shown.

I just added a dismiss() function to AlertView. Please check can it fix your problem.

mikeeeeeeeeeeeeeeee commented 8 years ago

Yes, thanks