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
#!/bin/bash | |
clone_encryption_sdk() { | |
echo '--------------------------------------------------' | |
echo 'Cloning EncryptionSDK' | |
echo '--------------------------------------------------' | |
git clone https://github.com/XYCompany/EncryptionSDK.git | |
} | |
clone_utilities() { |
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
//navigate within same module | |
func navigateToPayment() { | |
if let controller = AppStoryboard.Transactions.viewController(viewControllerClass: PaymentViewController.self) { | |
self.navigationController.pushViewController(controller, animated: true) | |
} | |
} | |
//navigate to different module | |
func navigateToPortfolioDashboard() { | |
let portfolioModule = Bundle(for: DashboardViewController.self) |
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
//navigate within same module | |
func navigateToPayment() { | |
let storyboard = UIStoryboard(name: "Transactions", bundle: nil) | |
if let controller = storyboard.instantiateViewController(withIdentifier: "PaymentViewController") as? PaymentViewController { | |
self.navigationController.pushViewController(controller, animated: true) | |
} | |
} | |
//navigate to different module | |
func navigateToPortfolioDashboard() { |
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
public enum Storyboard: String { | |
case Analytics, Dashboard, Reporting, Transactions | |
var instance: UIStoryboard { | |
return UIStoryboard(name: self.name, bundle: nil) | |
} | |
var name: String { | |
return self.rawValue | |
} |
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
public extension UIViewController { | |
class var storyboardID: String { | |
return "\(self)" | |
} | |
public func instantiateViewController<T: UIViewController>(viewControllerClass: T.Type, inStoryboard: String, ofModule: Bundle?) -> T { | |
let storyboard = UIStoryboard(name: inStoryboard, bundle: ofModule) | |
return storyboard.instantiateViewController(withIdentifier: viewControllerClass.storyboardID) as! T | |
} |
NewerOlder