From 969725145668358fcd22026debeae364418f4a54 Mon Sep 17 00:00:00 2001 From: Alexandr Kozhevnikov Date: Mon, 16 Apr 2018 10:33:53 +0300 Subject: [PATCH 1/2] Replacing flatMap With compactMap flatMap is mark as deprecated in Swift 4.1 and replaced by compactMap --- Sources/InnerAlertController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/InnerAlertController.swift b/Sources/InnerAlertController.swift index caa943e..3bc41d9 100644 --- a/Sources/InnerAlertController.swift +++ b/Sources/InnerAlertController.swift @@ -241,7 +241,7 @@ class InnerAlertController: UIAlertController { private func searchLabel(from text: String) -> UILabel? { return view.recursiveSubviews - .flatMap { $0 as? UILabel} + .compactMap { $0 as? UILabel} .first { $0.text == text } } From 53bc3e23989912132194a83108d3ea72c4a5dba0 Mon Sep 17 00:00:00 2001 From: sgr-ksmt Date: Mon, 16 Apr 2018 17:55:12 +0900 Subject: [PATCH 2/2] bump to 3.2. --- .swift-version | 2 +- Alertift.podspec | 2 +- README.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.swift-version b/.swift-version index 389f774..8a36cd1 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.0 \ No newline at end of file +4.1 \ No newline at end of file diff --git a/Alertift.podspec b/Alertift.podspec index 6ed04a3..7035b20 100644 --- a/Alertift.podspec +++ b/Alertift.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Alertift" - s.version = "3.1" + s.version = "3.2" s.summary = "UIAlertControlelr wrapper for Swift." s.homepage = "https://github.com/sgr-ksmt/Alertift" # s.screenshots = "" diff --git a/README.md b/README.md index 3cd54a6..b9a10b1 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Alertift.alert(title: "Alertift", message: "Alertift is swifty, modern, and awes ``` [![GitHub release](https://img.shields.io/github/release/sgr-ksmt/Alertift.svg)](https://github.com/sgr-ksmt/Alertift/releases) -![Language](https://img.shields.io/badge/language-Swift%204.0-orange.svg) +![Language](https://img.shields.io/badge/language-Swift%204.1-orange.svg) [![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![CocoaPods](https://img.shields.io/badge/Cocoa%20Pods-✓-4BC51D.svg?style=flat)](https://cocoapods.org/pods/Alertift) [![CocoaPodsDL](https://img.shields.io/cocoapods/dt/Alertift.svg)](https://cocoapods.org/pods/Alertift) @@ -41,7 +41,7 @@ Alertift.alert(title: "Alertift", message: "Alertift is swifty, modern, and awes ```bash # Swift4 or later -github "sgr-ksmt/Alertift" ~> 3.0 +github "sgr-ksmt/Alertift" ~> 3.2 # Less than Swift4 github "sgr-ksmt/Alertift" ~> 2.0