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 Foundation | |
| final class PListManager<Model: Decodable> { | |
| private let pListName: String | |
| func parseInnerData() -> Model? { | |
| let decoder = PropertyListDecoder() | |
| guard let pathToFileInResource = Bundle.main.path(forResource: pListName, ofType: "plist"), | |
| let innerData = FileManager.default.contents(atPath: pathToFileInResource) else { |
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
| // | |
| // CGFloat.swift | |
| // | |
| // | |
| // Created by kirill.tila on 14.06.2022. | |
| // | |
| // Рашсирение для удобной установки размеров | |
| import UIKit // SwiftUI |
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
| { | |
| "com.8bit.bitwarden": " ", | |
| "com.agilebits.onepassword-ios": "onepassword://", | |
| "com.apple.airport.mobileairportutility": "apmanage://", | |
| "com.apple.appleseed.FeedbackAssistant": "applefeedback://", | |
| "com.apple.AppStore": "itms-apps://itunes.apple.com/", | |
| "com.apple.AppStoreConnect": "shortcuts://run-shortcut?name=Icon%20Themer&input=%7B%22launch%22%3A%22Connect%22%7D", | |
| "com.apple.artistconnect": "shortcuts://run-shortcut?name=Icon%20Themer&input=%7B%22launch%22%3A%22Artists%22%7D", | |
| "com.apple.bnd": "beatsbond://", | |
| "com.apple.Bridge": "com.apple.bridge://x", |
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
| URL Schemes | |
| Apple | |
| Apple Music — music://geo.itunes.apple.com/us/albums/<albumID> | |
| – music://geo.itunes.apple.com/us/artists/<artistID> | |
| Apple News — applenews:// | |
| App Store — itms-apps://itunes.apple.com/app/<appID> | |
| Apple TV — videos:// |
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 View { | |
| func innerShadow<S: Shape, SS: ShapeStyle>( | |
| shape: S, | |
| color: SS, | |
| lineWidth: CGFloat = 1, | |
| offsetX: CGFloat = 0, | |
| offsetY: CGFloat = 0, | |
| blur: CGFloat = 4, | |
| blendMode: BlendMode = .normal, | |
| opacity: Double = 1 |
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 SwiftUI | |
| public class UIBackdropView: UIView { | |
| override class public var layerClass: AnyClass { | |
| return NSClassFromString("CABackdropLayer") ?? CALayer.self | |
| } | |
| } | |
| public struct Backdrop: UIViewRepresentable { | |
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 SwiftUI | |
| public struct RoundedCorner: Shape { | |
| public var radius: CGFloat = .infinity | |
| public var corners: UIRectCorner = .allCorners | |
| public func path(in rect: CGRect) -> Path { | |
| let path = UIBezierPath(roundedRect: rect, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius)) | |
| return Path(path.cgPath) |
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 | |
| class AdaptedConstraint: NSLayoutConstraint { | |
| // MARK: - Properties | |
| var initialConstant: CGFloat? | |
| override func awakeFromNib() { | |
| super.awakeFromNib() | |
| saveConstant() |
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 Publisher where Failure == Never { | |
| func weakAssign<T: AnyObject>( | |
| to keyPath: ReferenceWritableKeyPath<T, Output>, | |
| on object: T | |
| ) -> AnyCancellable { | |
| sink { [weak object] value in | |
| object?[keyPath: keyPath] = value | |
| } | |
| } |
OlderNewer