Swift-Initializer

Convenient Initialization Previous initializers were called specified initializers (required, no system will generate a default), and convenient initializers Uses of convenient initializers The specified initializer is not to be overlooked. The convenience initializer does work with the specified initializer in the data I have available at t ...

Posted by ewillms on Thu, 03 Mar 2022 19:29:22 +0100

Advanced SwiftUI animation - Part 2: GeometryEffect

In the first part of this series, I introduced the Animatable protocol and how we can use it to animate paths. Next, we will use a new tool: GeometryEffect to animate the transformation matrix with the same protocol. If you haven't read the first part and don't know what Animatable protocol is, you should read it first. Or if you're just inte ...

Posted by stevepatd on Mon, 21 Feb 2022 05:02:11 +0100

Quick browse Swift notes

Quick browse Swift notes Quick browse Swift: https://docs.swift.org/swift-book/GuidedTour/GuidedTour.html Variables are also constants //Multiline string, using "" "" let quotation = """ I said "I have \(3) apples." And then I said "I have \(3 + 4) pieces of fruit." """ print(quotation) //Create an empty array, variabl ...

Posted by mhodge87 on Sun, 20 Feb 2022 08:27:22 +0100

SwiftUI dynamically modifies iOS status bar style

. 1. Set the style of Status in the item setting options page. -Click item -Click the application to be set -Set the style of Status **Status Bar Style: * * Status Bar Style -* * Default: * * the Default style is based on the currently applied color mode. Dark Model displays white status bar and Light Model displays black status bar -* * Dar ...

Posted by ktstowell on Mon, 14 Feb 2022 15:42:32 +0100

swift5.1. Learning - 13 From OC to Swift

1. MARK, TODO, FIXME MARK: similar to the #pragma mark in OC MARK: - similar to the #pragma mark in OC- TODO: used to mark unfinished tasks FIXME: used to mark the problem to be fixed 2. Conditional compilation // Operating system: macOS\iOS\tvOS\watchOS\Linux\Android\Windows\FreeBSD #if os(macOS) || os(iOS) // CPU architecture: i386\ ...

Posted by nelson201 on Sun, 06 Feb 2022 21:19:51 +0100

RxSwift + Moya + HandyJSON + various plug-ins to build a responsive network architecture

๐Ÿงš. RxSwift + Moya + HandyJSON + Plugins.๐Ÿ‘’๐Ÿ‘’๐Ÿ‘’ English |Simplified Chinese Build responsive data binding network API architecture based on RxSwift + Moya MoyaNetwork The module is based on the network API architecture encapsulated by Moya It is mainly divided into the following 8 parts: NetworkConfig : set the configuration informati ...

Posted by sasi on Fri, 28 Jan 2022 02:27:08 +0100

Continuation - connects asynchronous tasks and synchronous code

Proposal: SE-0300Authors: John McCall, Joe Groff, Doug Gregor, Konrad MalawskiAudit Supervisor: Ben CohenStatus: implemented in Swift 5.5Historical revision: 1, 2introduceAsynchronous Swift code needs to be able to be used with existing synchronous code, which uses technologies such as completion callback or delegate method to respond to events ...

Posted by anups on Thu, 27 Jan 2022 22:12:44 +0100

Basic use and advanced practice of NavigationView of SwiftUI

1, Foreword In the framework of UIKit, we often use UINavigationViewController to manage page push and pop, which is the basic operation of page management. When it comes to SwiftUI, the operation is completed by NavigationView and NavigationLink.This article starts with the basic application of NavigationView, and then adds how to flexibly us ...

Posted by poisa on Thu, 27 Jan 2022 14:55:16 +0100

Remnant of iOS interview - exorcism sword spectrum

How does GCD work? Included in this article: https://juejin.cn/post/6976878024566243335 1. Serial queue, synchronous operation, no new thread will be created, and the operation will be executed in sequence; Serial queue, asynchronous operation, new thread will be created, and the operation will be carried out in sequence, Usage scenario: op ...

Posted by soto134 on Wed, 26 Jan 2022 08:03:17 +0100

TCA - SwiftUI's savior?

preface stay Last article on TCA In, we saw the operation mode of a Feature in TCA through overview, and tried to implement a minimum Feature and its test. In this article, we will continue to go deep into the processing of Binding in TCA and the method of using Environment to decouple dependencies from reducer. If you want to follow, you ...

Posted by misc00500 on Sat, 22 Jan 2022 02:11:34 +0100