Данный документ актуален по состоянию на стабильный XCode 11.1
На iPhone из
NavigationViewосуществляется push переход черезNavigationLinkв destination. После возврата pop, видим что память, которую занимал detination, не освободилась.
| import CoreData | |
| enum db { | |
| static let todoist: DAO = { | |
| let container = NSPersistentContainer(name: "Todoist") | |
| container.loadPersistentStores(completionHandler: { (storeDescription, error) in | |
| guard let err = error else { return } | |
| fatalError(err.localizedDescription) | |
| }) | |
| return DAO(container: container) |
| import Foundation | |
| enum EncodableOptional<Wrapped>: ExpressibleByNilLiteral { | |
| case none | |
| case some(Wrapped) | |
| init(nilLiteral: ()) { | |
| self = .none | |
| } | |
| } |
| import Foundation | |
| import CommonCrypto | |
| public func jwt(payload: [String: Any], secret: String) -> String? { | |
| guard let data = try? JSONSerialization.data(withJSONObject: payload, options: []) else { | |
| return nil | |
| } | |
| return jwt(payload: data, secret: secret) | |
| } |
| import SwiftUI | |
| import Combine | |
| struct ContentView: View { | |
| struct _State { | |
| var text = "" | |
| } | |
| @State var state = _State() |
| import SwiftUI | |
| import Combine | |
| struct ContentView: View { | |
| struct _State { | |
| var source: CGRect? | |
| var content: CGRect? | |
| var isArrow: Bool { | |
| return source != nil |
| import Foundation | |
| import SwiftUI | |
| struct FocusView: View { | |
| let path: Path | |
| let backgroundColor: Color | |
| init(path: Path, backgroundColor: Color = Color.black.opacity(0.3)) { | |
| self.path = path |
| # Uncomment the next line to define a global platform for your project | |
| require 'find' | |
| platform :ios, '13.0' | |
| install! 'cocoapods', :integrate_targets => false | |
| use_frameworks! | |
| target 'StockQuotes' do | |
| # Pods for StockQuotes |
| // | |
| // File.swift | |
| // | |
| // | |
| // Created by Alexey Averkin on 28.10.2020. | |
| // | |
| import Foundation | |
| func main() { |
| import Foundation | |
| import Combine | |
| import PassKit | |
| enum Request { | |
| static var applePay: PaymentRequestBuilder { | |
| return PaymentRequestBuilder() | |
| } | |
| } |