[TOC]
Lightweight solution on getting all the countries and its phone extension code with their names and emoji flags
import UIKit | |
extension UIViewController { | |
/// method that instantiate a xib file given a string name using Generic | |
static func loadFromNib() -> Self { | |
func instantiateFromNib<T: UIViewController>() -> T { | |
return T.init(nibName: String(describing: T.self), bundle: nil) | |
} | |
return instantiateFromNib() | |
} |