kennymuse / UIAlertView

This class wrap UIAlertView (deprecated from iOS 9) and use the new UIAlertController class if the iOS is major of 8. This is transparently to the programmer hence is sufficient import this classes. An example of use is into the project. The utility of this classes is when in a old project there are more UIAlertView to change.
MIT License
0 stars 0 forks source link

How to use #1

Closed hy9be closed 7 years ago

hy9be commented 7 years ago

Hi I need to clean up a lot UIAlertView deprecation in an app, and your wrapper looks promising as it aimed at transparency. Could you tell how should I use it? Add all files in the UIAlertViewWrapper folder, and do not change anything else?

Thanks!

kennymuse commented 7 years ago

Hi, import the classes in the Xcode project; then in the pch of the project or in every view controller write #import "UIAlertView+Extension.h".

hy9be commented 7 years ago

Thanks for the reply!

I followed your steps but still got the deprecation warning: image

Any directions for further investigation?

kennymuse commented 7 years ago

The warning is normal. The AlertView is deprecated (with my solution you don't use UIAlertView with new iOS >= 9 but the warning exist). If you want you can force XCode to hide the warning. Search with google. ;-)

hy9be commented 7 years ago

Got it. Thanks!

kennymuse commented 7 years ago

The utility of these classes is in UIAlertView's massive replacement with UIAlertController. I had to replace them on a very large project (many UIAlertViews) because there were unexpected graphic effects (flickering, etc.). The warnings remain but they can be hidden forcibly.