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
gradientLayer.startPoint = CGPoint(x: 0, y: 1) | |
gradientLayer.endPoint = CGPoint(x: 0, y: 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
/// Register settings bundle in the app | |
public func registerSettingsBundle() { | |
let appDefaults = [String: AnyObject]() | |
UserDefaults.standard.register(defaults: appDefaults) | |
} |
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
/usr/libexec/PlistBuddy path_to/Settings.bundle/Root.plist -c "Clear" | |
/usr/libexec/PlistBuddy path_to/Services.plist -c "Clear" |
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: ASViewController<ASScrollNode>, UIScrollViewDelegate { | |
let someFixedNode: ASDisplayNode = { | |
let node = ASDisplayNode() | |
node.backgroundColor = .red | |
node.style.height = ASDimension(unit: .points, value: 250) | |
return node | |
}() | |
let someFlexibleNode: ASDisplayNode = { | |
let node = ASDisplayNode() |
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
public struct InviteFeedModel: Codable { | |
public var level: Int? | |
public var performerId: String | |
public var performerName: String? | |
public var newParticipantId: String? | |
public var newParticipantName: String? | |
public init(level: Int?, performerId: String, performerName: String?, newParticipantId: String?, newParticipantName: String?) { | |
self.level = level |
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
enum ServiceError: Error { | |
case timeout | |
case nilData | |
} | |
extension SwaggerClientAPI { | |
private enum HeadersKeys: String { | |
case authorization = "Authorization" | |
} | |
class func setBearer(_ token: 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
{ | |
"current_page": 1, | |
"data": [ | |
{ | |
"type": "draft", | |
"source": "subscribe", | |
"trainings_count": 10, | |
"created_at": "2019-04-23 17:10:42", | |
"trainings": [ | |
{ |
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 UIWindow { | |
/// Fix for http://stackoverflow.com/a/27153956/849645 | |
func set(rootViewController newRootViewController: UIViewController, | |
withTransition transition: CATransition? = nil) { | |
let previousViewController = rootViewController | |
if let transition = transition { | |
// Add the transition |