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
// 0. Default. Xcode generating. | |
class SceneDelegate: UIResponder, UIWindowSceneDelegate { | |
var window: UIWindow? | |
func scene( | |
_ scene: UIScene, | |
willConnectTo session: UISceneSession, | |
options connectionOptions: UIScene.ConnectionOptions) { | |
let contentView = ContentView() |
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
/** | |
Слой с иконкой | |
*/ | |
@property (weak, nonatomic) CAShapeLayer *iconLayer; | |
@end | |
@implementation YTSSuccessIconView | |
- (instancetype)init |
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
- (CAAnimationGroup*)makeSuccessIconAnimation | |
{ | |
CGFloat const animationDuration = 0.4; | |
CAAnimationGroup *animation = [CAAnimationGroup animation]; | |
animation.delegate = self; | |
[animation setValue:_successIconAnimationId forKey:_animationIdKeyName]; | |
CABasicAnimation *appearAnimation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"]; | |
appearAnimation.fromValue = @0.0; | |
appearAnimation.toValue = @1.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
import UIKit | |
protocol CellViewModelActionable { | |
typealias Action = () -> Void | |
var onClick: Action? { get } | |
} | |
protocol CellViewModel { | |
static var cellAnyType: UIView.Type { get } | |
func setupAny(cell: UIView) |
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 UIKit | |
extension NSAttributedString { | |
static func makeAtributes( | |
font: UIFont, | |
lineSpacing: CGFloat? = nil, | |
characterSpacing: CGFloat? = nil, | |
color: UIColor? = nil | |
) -> [String: Any] { |
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
// | |
// Storage.swift | |
// | |
// Created by Grigory Avdyushin on 30.06.16. | |
// Copyright © 2016 Grigory Avdyushin. All rights reserved. | |
// | |
import UIKit | |
import CoreData |
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 UIKit | |
public extension UIDevice { | |
var modelName: String { | |
var systemInfo = utsname() | |
uname(&systemInfo) | |
let machineMirror = Mirror(reflecting: systemInfo.machine) | |
let identifier = machineMirror.children.reduce("") { identifier, element in | |
guard let value = element.value as? Int8 where value != 0 else { return identifier } |