This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//How to implement ? | |
let values = self.provinceList.compactMap{$0.name ?? ""} | |
let picker = PickerManager(input: values, selected: values.first) { (value, index) in | |
self.txtProvinces.text = value | |
self.provinceID = self.provinceList[index].provinceID ?? 0 | |
} | |
self.txtProvinces.inputView = picker | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//-- ViewController -- | |
func retriveCountryAreaList(selectedCountry:String) { | |
if CacheDataManager.shared.countryAreaDataList != nil { | |
self.countryAreaList = CacheDataManager.shared.countryAreaDataList?.data ?? [] | |
return | |
} | |
self.startLoading() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
This method is used to call a GET API | |
- Parameter url: A String url to call POST Api. | |
- Parameter param: A Dictionary of API parameters. | |
- Parameter success: A Success block of API response. | |
- Parameter failure: A Failure block of API response. | |
*/ | |
public typealias success = (_ response: JSON) -> Void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import UIKit | |
@IBDesignable class RoundShadowView: UIView { | |
@IBInspectable var shadow: Bool { | |
get { | |
return layer.shadowOpacity > 0.0 | |
} | |
set { | |
if newValue == true { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final class ForceToUpdateApp { | |
static func isForceToUpdateRequired(versionNumber:Int) -> Bool { | |
if (UserDefaults.standard.object(forKey: "appVersion") as? String) == nil { | |
UserDefaults.standard.set(Bundle.main.releaseVersionNumber, forKey: "appVersion") | |
} | |
if (UserDefaults.standard.object(forKey: "apiVersion") as? Int) == nil { | |
UserDefaults.standard.set(versionNumber, forKey: "apiVersion") | |
} |