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
https://help.apple.com/app-store-connect/#/devd274dd925 |
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
var blurAnimator: UIViewPropertyAnimator! | |
let blurEffectView = UIVisualEffectView() | |
blurEffectView.backgroundColor = .clear | |
blurEffectView.frame = view.bounds | |
blurEffectView.autoresizingMask = [.flexibleWidth, .flexibleHeight] | |
blurAnimator?.stopAnimation(true) | |
blurAnimator?.finishAnimation(at: .current) | |
view.subMenuCollectionView.addSubview(blurEffectView) | |
blurAnimator = UIViewPropertyAnimator(duration: 1, curve: .linear) { [blurEffectView] in | |
blurEffectView.effect = UIBlurEffect(style: .dark) |
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 Model : String { | |
//Simulator | |
case simulator = "simulator/sandbox", | |
//iPod | |
iPod1 = "iPod 1", | |
iPod2 = "iPod 2", | |
iPod3 = "iPod 3", | |
iPod4 = "iPod 4", |
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
https://www.youtube.com/watch?v=YwE3_hMyDZA |
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
extension CATransition { | |
func segueFromBottom() -> CATransition { | |
self.duration = 0.375 //set the duration to whatever you'd like. | |
self.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut) | |
self.type = CATransitionType.moveIn | |
self.subtype = CATransitionSubtype.fromTop | |
return 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
let headers = [ | |
"x-rapidapi-host": "covid-19-data.p.rapidapi.com", | |
"x-rapidapi-key": "177e0ab6e3msh242bbbb79f55e0fp161398jsna8fc21704db9" | |
] | |
let request = NSMutableURLRequest(url: NSURL( | |
string: "https://covid-19-data.p.rapidapi.com/country/all")! as URL, | |
cachePolicy: .useProtocolCachePolicy, | |
timeoutInterval: 10.0) | |
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
private func dismissKeyboardOnTap() { | |
self.view.addGestureRecognizer(UITapGestureRecognizer(target: self.view, action: #selector(UIView.endEditing(_: )))) | |
} |
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
private func checkTime() -> Bool { | |
let dateFormatter: DateFormatter = DateFormatter() | |
dateFormatter.timeZone = TimeZone(abbreviation: "PKT") | |
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss" | |
let timeslot = "2021-11-09 16:00:00" | |
let currentDate = Date() | |
let date: Date = dateFormatter.date(from: timeslot)! | |
let currentTime = 60 * Calendar.current.component(.hour, from: currentDate) + Calendar.current.component(.minute, from: currentDate) + (Calendar.current.component(.second, from: currentDate) / 60) | |
let time = 60 * Calendar.current.component(.hour, from: date) + Calendar.current.component(.minute, from: date) + (Calendar.current.component(.second, from: date) / 60) |
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 | |
struct Currency { | |
var date: Date? | |
var numCode: String? | |
var charCode: String? | |
var nominal: String? | |
var nominalDouble: Double? | |
var name: String? |
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
private var variable: Bool { | |
get { | |
return UserDefaults.standard.bool(forKey: "variableKey") | |
} | |
set { | |
UserDefaults.standard.setValue(newValue, forKey: "variableKey") | |
UserDefaults.standard.synchronize() | |
} | |
} |
NewerOlder