This file contains hidden or 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
| extension Constant { | |
| static func twoDecimalValueReturnDouble(_ total:Double) -> Double { | |
| let val = String(format: "%.2f", total) | |
| let final = (val as NSString).doubleValue | |
| return final | |
| } | |
| static func twoDecimalValue(_ total:Double) -> String { | |
| return String(format: "%.2f", total) |
This file contains hidden or 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
| extension NSMutableAttributedString { | |
| var fontSize:CGFloat { return 14 } | |
| var boldFont:UIFont { return UIFont(name: "OpenSans-SemiBold", size: fontSize) ?? UIFont.boldSystemFont(ofSize: fontSize) } | |
| var normalFont:UIFont { return UIFont(name: "OpenSans-Regular", size: fontSize) ?? UIFont.systemFont(ofSize: fontSize)} | |
| // var smallSizeFont:UIFont { return UIFont(name: "OpenSans-Regular", size: CGFloat(7)) ?? UIFont.systemFont(ofSize: fontSize)} | |
| func bold(_ value:String) -> NSMutableAttributedString { | |
This file contains hidden or 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
| extension ProductDescriptionTableViewCell: WKNavigationDelegate, WKUIDelegate { | |
| /* | |
| import WebKit | |
| import SafariServices | |
| @IBOutlet weak var webViewLIveChat: WKWebView! | |
| var activityIndicator: UIActivityIndicatorView! | |
| */ | |
| func setupURL(_ htmlString:String) { |
This file contains hidden or 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
| 1) Create New Repo for project | |
| Cd path | |
| Git remote -v (check have any old paths) | |
| rm -rf .git (if have any old paths remove) | |
| Git remote -v (check have any old paths) | |
| Git init . | |
| Git remote add origin SSHkey ( SSHKey will get from aws when click on create button and enter project name then get ssh keys and https keys) | |
| Git checkout -b dev | |
| Git add . |
This file contains hidden or 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
| @IBOutlet weak var searchTextField: UITextField! | |
| searchTextField.delegate = self | |
| extension FavoriteVC:UITextFieldDelegate { | |
| func textFieldShouldReturn(_ textField: UITextField) -> Bool { | |
| textField.resignFirstResponder() | |
| return true |
This file contains hidden or 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 | |
| import Foundation | |
| //CONSTANT | |
| let BOUNDS = UIScreen.main.bounds | |
| let KEY_WINDOW = UIApplication.shared.windows.filter {$0.isKeyWindow}.first | |
This file contains hidden or 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 | |
| // MARK: Switcher class | |
| enum RootVC:String { | |
| case LoginViewController, TabBarVC | |
| } | |
| class Switcher { | |
| static let shared = Switcher() |
This file contains hidden or 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
| pod 'Firebase/Analytics' | |
| pod 'Firebase/Messaging' | |
| import UserNotifications | |
| import UserNotificationsUI | |
| import Firebase | |
| import FirebaseMessaging |
This file contains hidden or 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
| @IBOutlet weak var collectionviewList: UICollectionView! | |
| func baseSetup() { | |
| self.headerTitles.removeAll() | |
| collectionviewList.register(UINib(nibName: "TitleCollectionViewCell", bundle: nil), forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: "TitleCollectionViewCell") | |
| collectionviewList.delegate = self | |
| collectionviewList.dataSource = self | |
| let layout = UICollectionViewFlowLayout() | |
| layout.sectionInset = UIEdgeInsets(top: 5, left: 0, bottom: 5, right: 15) | |
| layout.minimumInteritemSpacing = 0 |
OlderNewer