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 UIKit | |
enum AppStoryboard : String{ | |
case Main = "Main" | |
case PreLogin = "Payment" | |
var instance : UIStoryboard { | |
return UIStoryboard(name: self.rawValue, bundle: Bundle.main) | |
} | |
func viewController<T>(vc : T.Type) -> T where T: UIViewController{ | |
let identifier = String(describing: T.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
// | |
// Created by Muhammad Ashir Mubeen on 13/07/2022. | |
// | |
#if os(iOS) || os(tvOS) | |
import UIKit | |
#elseif os(OSX) | |
import AppKit | |
#endif |
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 Cocoa | |
// MARK: - Abstract | |
/// Draws Linear Gradient and designable from storyboard. | |
class DesignableGradientView: NSView { | |
@IBInspectable var isDrawGradient: Bool = false { | |
didSet { |
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
if let assesFile = NSDataAsset.init(name: "fileName") { | |
let data = assesFile.data | |
do { | |
let model = try JSONDecoder().decode(Model.self, from: data) | |
self.processReadJsonData(model: model) | |
return true | |
}catch { | |
print(error.localizedDescription) | |
return false | |
} |
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
let colors:[String] = [ | |
"#F44336", | |
"#FFEBEE", | |
"#FFCDD2", | |
"#EF9A9A", | |
"#E57373", | |
"#EF5350", | |
"#F44336", | |
"#E53935", | |
"#D32F2F", |