ios - Hide UiAlert for PayPal MPL -
i'm using paypal mpl ios lib. when ever press cancel button alert message displayed. how prevent uialert coming up?
it appears if paypal library putting alertview up. unless there in paypal library disable feature can't directly disable it. there might couple of workarounds, here thoughts:
listen notifications when new uiwindow displayed via nsnotification center. notifications listed @ bottom of document.
heres post deals listening notification.
is there notification on ios if uialertview shown?
my thought maybe can catch when alertview being shown can undo calling makekeyandvisible on appdelegates window object
[[uiapplication sharedapplication].delegate.window makekeyandvisible];
the other thought me seems total hack i'm not going advocate or justify use method swizzling. if swizzled [show] function of uialertview inject simple if statement decide wether or not call real show method deciding wether or not alert shown or not. there may unforeseen consequences going route. if not familiar technique nshipster has writeup http://nshipster.com/method-swizzling/. before going route consider how necessary disabling alert is.
Comments
Post a Comment