i have legacy codebase managing, needs display alert messages on place. terrible practice , in need of refactor, isn't going happen time soon. ios 9 need ability fire & forget alert view, , have view display , queuing managed me.
to show, uialertcontroller, need object of uiviewcontroller can use below way that.
uiwindow *keywindow = [[uiapplication sharedapplication]keywindow]; uiviewcontroller *maincontroller = [keywindow rootviewcontroller]; [maincontroller presentviewcontroller:alert animated:yes completion:nil]; thanks
Comments
Post a Comment