Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions MRCountryPicker/Classes/SwiftCountryPicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ open class MRCountryPicker: UIPickerView, UIPickerViewDelegate, UIPickerViewData

var countries: [Country]!
open var selectedLocale: Locale?
open weak var countryPickerDelegate: MRCountryPickerDelegate?
@objc open weak var countryPickerDelegate: MRCountryPickerDelegate?
open var showPhoneNumbers: Bool = true

override init(frame: CGRect) {
Expand Down Expand Up @@ -57,15 +57,15 @@ open class MRCountryPicker: UIPickerView, UIPickerViewDelegate, UIPickerViewData

// MARK: - Country Methods

open func setCountry(_ code: String) {
@objc open func setCountry(_ code: String) {
for index in 0..<countries.count {
if countries[index].code == code {
return self.setCountryByRow(row: index)
}
}
}

open func setCountryByPhoneCode(_ phoneCode: String) {
@objc open func setCountryByPhoneCode(_ phoneCode: String) {
for index in 0..<countries.count {
if countries[index].phoneCode == phoneCode {
return self.setCountryByRow(row: index)
Expand Down