iOS uses Metal to realize filter and dynamic filter
preface
Harbeth It is a small part of utilities and extensions on Apple's Metal framework, which is committed to making your Swift GPU code more concise and allowing you to build pipeline prototypes faster. This paper introduces and designs the filter based on GPU, graphics processing and filter making ๐๐๐
Function list
๐ฃ At present, Met ...
Added by mkr on Mon, 07 Mar 2022 12:16:10 +0200
OCLint + Jenkins + SonarQube build iOS code static analysis system
background
With the increasing amount of code and the expansion of the team, when we want to iterate quickly, we often want to get the requirements online as soon as possible, resulting in the code is not very standardized, leaving a pile of technical debt over a long time, and the quality of the code is not guaranteed. So I began to try some ...
Added by yelvington on Sun, 27 Feb 2022 13:40:45 +0200
Swift Series Four-Enumeration
Moderately aliasing types can make your code easier to understand, more efficient to develop, and more maintainable.
1. typealias (alias)
Typeealias are used to alias types.
typealias Byte = Int8
typealias Short = Int16
typealias Long = Int64
typealias Date = (year: Int, month: Int, day: Int)
func test(_ date: Date) {
print(date.year) ...
Added by tazz on Sat, 19 Feb 2022 13:48:18 +0200
Suggestions on data types in the [OC/Swift hybrid] interface: use level analysis
1, Foreword
As mentioned above, under the OC/Swift mix, the following suggestions are made for the data types of attributes or parameters:
1. Use immutable types as much as possible and immutable types as little as possible. (suggestions: NSString *, NSArray *, - NSDictionary *)2. Use generics as much as possible to specify the type of el ...
Added by Dan400007 on Sat, 29 Jan 2022 12:40:12 +0200
Take you to a Netease cloud music home page (Part I)
preface
Hello, everyone, I've been learning to encode with Swift recently. Because many previous projects were implemented with OC, I'm still in the stage of learning about Swift. In order to improve my learning efficiency, I will set a short-term goal for myself every time. This time, in order to speed up my starting Swift, my goal is to comp ...
Added by zxiny_chin on Sat, 15 Jan 2022 23:28:34 +0200
swift installation skills: how to use map to generate arrays and write 2 lines less code than for (with demo code)
Let's start with the conclusion: map uses 3 lines of code to solve the problem of 5 lines of code in the for loop, which is equivalent to a 40% increase in efficiency
You can't learn without (I said)
If you don't use it, you won't be able to use it Because you don't know the usage scenario, you can't use it because you haven't learned it ...
Added by MilesStandish on Fri, 14 Jan 2022 02:57:58 +0200
Quartz 2D realizes the effect of text hollowing out
What is the effect of hollowing, the following figure is a text with the effect of hollowing out:
As can be seen from the figure, the text is transparent, and you can see the following picture content, while other parts of the UILabel have a white background.
Using Quartz 2D to draw the hollowing effect, the general idea is as follows:
Implem ...
Added by dgwade on Wed, 12 Jan 2022 12:06:34 +0200
Swift's practice in 58 anjuke real estate
01
Background
In 2014, Apple released a new language Swift at WWDC. Since then, it has been continuously updated, iterated and optimized. Major companies ...
Added by mouli on Wed, 05 Jan 2022 13:48:34 +0200
iPhone development Swift foundation 03 video and network request
Video player
Before iOS 9, MPMoviePlayerController was used. With the continuous iteration of iOS, AVPlayer has become the mainstream. To add a resource file to a project:
import UIKit
import AVFoundation
class ViewController: UIViewController{
var avPlayer : AVPlayer?
override func viewDidLoad() {
super.viewDidLoad()
...
Added by George W. Bush on Tue, 04 Jan 2022 09:20:08 +0200
Use AVPlayer to customize the player that supports full screen - Swift reconstructed version
preface
A long time ago, a simple video player was open-source. Due to its long disrepair, the effect was terrible. Recently, it specially took time to deeply reconstruct it. The old version will not be maintained later. The new version is implemented by Swift, and more functions will be added later. If you don't want to read the text, please d ...
Added by ringartdesign on Wed, 29 Dec 2021 20:42:17 +0200