Showing a blocked UIAlertView in ViewDidAppear Method on iOS 7 with Xamarin.iOS does not work -
if try show blocked alertview in viewdidappear method on ios 7, won´t able dismiss alertview. no touch events reach alertview. button of view highlighted, nothing happen. if run same code on ios < 7, work fine.
here example code:
public override void viewdidappear(bool animated) { base.viewdidappear(animated); var alert = new uialertview("title", "message", null, "ok"); alert.dismissed += (sender, args) => result = true; alert.show(); while (!result) nsrunloop.current.rununtil(nsdate.fromtimeintervalsincenow(0.1)); }
i using xamarin.ios version 6.4.3.0 apple sdk 6.1. have same problems alpha of xamarin.ios 6.9.6.0 , apple sdk 7.0.
can tell me problem is?
thanks help.
it's not idea use nsrunloop
block ui execution, there better way of doing it.
you can make use async/await pattern wait user press uialertview
button. here's sample can use: https://gist.github.com/prashantvc/6725882
Comments
Post a Comment