Minimum: Swift 5.1.0, Xcode 11.0.0, iOS 9.0.0
BSCountryViewController is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'BSCountryViewController'
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift
compiler. It is in early development, but Alamofire does support its use on supported platforms.
Once you have your Swift package set up, adding Alamofire as a dependency is as easy as adding it to the dependencies
value of your Package.swift
.
dependencies: [
.package(url: "https://github.com/Adobels/BSCountryViewController.git", .upToNextMajor(from: "1.0.0"))
]
import UIKit
import BSCountryViewController
class ViewController: UIViewController {
@IBAction func didTapPresentCountriesPickerButton() {
let vc = BSCountryViewController()
vc.delegate = self
present(vc, animated: true, completion: nil)
}
}
extension ViewController: BSCountryViewControllerDelegate {
func didSelectRegions(_ regions: [String]) {
debugPrint("--- didSelectRegions ---")
debugPrint(regions)
}
func didTapDoneButton(with regions: [String]?) {
debugPrint("--- didTapDoneButton ---")
debugPrint(regions ?? "regions array is nil")
dismiss(animated: true, completion: nil)
}
}
link |
Stars: 1 |
Last commit: 4 years ago |
Add Swift Package Manager
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics