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
| //Default | |
| import Foundation | |
| import UIKit | |
| class LoaingView:UIView { | |
| public static let shared = LoaingView() | |
| private var indicator:UIActivityIndicatorView = { | |
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 - (At webservice - refreshTOken) | |
| OktaAuthManager.shared.renewTokens { stateManager, error in | |
| if let error = error { | |
| print("Renew token error: \(error)") | |
| return | |
| } | |
| // Successfully renewed token |
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
| func dateSetup(_ dateStr:String) -> String { | |
| let formatter = DateFormatter() | |
| formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZ" | |
| let dateString = formatter.date(from: dateStr) | |
| formatter.dateFormat = "MM-dd-yyyy" | |
| return formatter.string(from: dateString ?? Date()) | |
| } |
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
| Notification bar | |
| ==================== | |
| => Navigation bar color and title color and text change and status bar: | |
| AppDelegate | |
| UINavigationBar.appearance().barTintColor = UIColor(displayP3Red: 47/255, green: 54/255, blue: 64/255, alpha: 1.0) | |
| UINavigationBar.appearance().largeTitleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.white] | |
| UINavigationBar.appearance().titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.white] |
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
| #Gerenare device framework | |
| xcodebuild archive -scheme ${PROJECT_NAME} -archivePath "${PROJECT_DIR}/build/${PROJECT_NAME}-iphoneos.xcarchive" -sdk iphoneos SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES | |
| #Generate simulator framework | |
| xcodebuild archive -scheme ${PROJECT_NAME} -archivePath "${PROJECT_DIR}/build/${PROJECT_NAME}-iossimulator.xcarchive" -sdk iphonesimulator SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES | |
| #Generate xcframework for both arches | |
| xcodebuild -create-xcframework -framework "${PROJECT_DIR}/build/${PROJECT_NAME}-iphoneos.xcarchive/Products/Library/Frameworks/${PROJECT_NAME}.framework" -framework "${PROJECT_DIR}/build/${PROJECT_NAME}-iossimulator.xcarchive/Products/Library/Frameworks/${PROJECT_NAME}.framework" -output "${PROJECT_DIR}/build/${PROJECT_NAME}.xcframework" | |
| #Open directory where xcframework were generate |
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
| =========================== UIView - Placed on VC ======================= | |
| UIApplication.shared.keyWindow?.addSubview(self.resetView) | |
| self.resetView.frame.size.height = (self.navigationController?.view.bounds.height)! | |
| self.resetView.frame.size.width = self.view.bounds.width | |
| self.resetView.alpha = 0.0 | |
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 |
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
| import Foundation | |
| import UIKit | |
| // MARK: Switcher class | |
| enum RootVC:String { | |
| case LoginViewController, TabBarVC | |
| } | |
| class Switcher { | |
| static let shared = Switcher() |
NewerOlder