// // Utility.swift // CockFight // // Created by Visoth Phon on 3/20/21. import Foundation import UIKit class Utility: NSObject { static let CustomURLScheme = "smartOfficeChatUrlScheme://" struct URL{ //Base URL static let BASEURL = "http://68.183.196.200:1000" static let SOCKET_URL = "http://68.183.196.200:2000" static let LOGIN = "v1/users/login" // static let GET_MASTER_DATA_LOTO = "v2/mobile/getMasterDataLoto" // // static let GET_LIST_17_LOTO = "v2/mobile/getList17LotoRamdomResult" } static func getHeader() -> Dictionary { let token = (UserDefaults.standard.object(forKey:"token") == nil) ? "" : UserDefaults.standard.object(forKey:"token") as! String let header = ["Content-Type": "application/json", "Authorization":token] return header } static func roundCornerView(view : UIView, borderColor: UIColor, borderSize : CGFloat){ view.layer.cornerRadius = borderSize view.layer.borderColor = borderColor.cgColor view.clipsToBounds = true } static func roundCornerTextField(txtField : UITextField, roundSize : CGFloat){ txtField.backgroundColor = UIColor.white txtField.layer.cornerRadius = roundSize txtField.layer.borderWidth = 1.0 } static func roundCornerButton(btn : UIButton, roundSize : CGFloat){ btn.layer.cornerRadius = roundSize } }