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
{ | |
"data":{ | |
"Big":[ | |
{ | |
"date":"21.06.2019", | |
"name":"46 серия", | |
"url":"https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4", | |
"thumb":"https://peach.blender.org/wp-content/uploads/big_big_buck_bunny_small.jpg?x43337" | |
} | |
], |
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 Collection { | |
subscript(safe index: Index) -> Element? { | |
return indices.contains(index) ? self[index] : nil | |
} | |
} |
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. Timer To Animate Our Text | |
var animationTimer: Timer? | |
//2. Variable To Store The Current Time | |
var time:Int = 0 | |
/// Animates The Presentation Of SCNText To Give An Appearance Of A Typing Effect | |
/// | |
/// - Parameters: | |
/// - textGeometry: SCNText |
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
{ | |
"data":[ | |
{ | |
"url":"https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_30mb.mp4", | |
"name":"Bug bunny", | |
"type":"MP4" | |
}, | |
{ | |
"url":"https://sample-videos.com/audio/mp3/wave.mp3", | |
"name":"Noise", |
This file has been truncated, but you can view the full file.
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
[ | |
{ | |
"ISIN": "SP72EL7RYK6UN1G", | |
"STAT": { | |
"W": { | |
"price": [ | |
{ | |
"date": 1547413200000, | |
"price": 10.35 |
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
localeIdentifier | Description | |
---|---|---|
eu | Basque | |
hr_BA | Croatian (Bosnia & Herzegovina) | |
en_CM | English (Cameroon) | |
rw_RW | Kinyarwanda (Rwanda) | |
en_SZ | English (Swaziland) | |
tk_Latn | Turkmen (Latin) | |
he_IL | Hebrew (Israel) | |
ar | Arabic | |
uz_Arab | Uzbek (Arabic) |
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
// | |
// NSDataExtensions.swift | |
// MAPO | |
// | |
// Created by Hugues Bernet-Rollande on 21/3/16. | |
// Copyright © 2016 WB Technologies. All rights reserved. | |
// | |
import Foundation |
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
class ViewController: UIViewController { | |
var isHidden:Bool = false { | |
didSet{ | |
UIView.animate(withDuration: 0.5) { () -> Void in | |
self.setNeedsStatusBarAppearanceUpdate() | |
} | |
} | |
} | |
override var preferredStatusBarUpdateAnimation: UIStatusBarAnimation{ |
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 UIImage { | |
class func outlinedEllipse(size: CGSize, color: UIColor, lineWidth: CGFloat = 1.0) -> UIImage? { | |
UIGraphicsBeginImageContextWithOptions(size, false, 0.0) | |
guard let context = UIGraphicsGetCurrentContext() else { | |
return nil | |
} | |
context.setStrokeColor(color.cgColor) | |
context.setLineWidth(lineWidth) |
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 isValidEmail(email: String) -> Bool { | |
let emailRegEx = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}" | |
let validatedEmail = NSPredicate(format:"SELF MATCHES %@", emailRegEx) | |
return validatedEmail.evaluate(with: email) | |
} | |
func isValidPassword(password: String) -> Bool { | |
let passwordRegEx = "[A-Z0-9a-z]{5,}" | |
let validatedPassword = NSPredicate(format:"SELF MATCHES %@", emailRegEx) | |
return validatedPassword.evaluate(with: password) |
NewerOlder