UIAlertView in Swift closures

Paul Ardeleanu
Paul Ardeleanu’s Blog
1 min readDec 13, 2015

UIAlertView has been deprecated in iOS 8.0 in favour of UIAlertController — but one still needs UIAlertView if iOS 7 support is required.

Using UIAlertViewDelegate is a bit cumbersome and whilst lots of Objective-C implementation with blocks are available, I needed one for Swift.

So here is my solution — a simple implementation of UIAlerView with Swift closures.

--

--

Paul Ardeleanu
Paul Ardeleanu’s Blog

iOS & Web engineer, trainer and coach - with a dash of UX & UI.