Preface This article starts with a broad introduction and gradually narrows down to detailed specifics — in other words, it moves from coarse-grained to fine-grained. If you have any questions a...
Preface Here’s the diagram first. In this post, we’ll learn how to parse most multimedia file formats with one set of code and turn them into a common model — a normalized metadata key-value ...
Availability Checking API In Swift code, you often see that a certain API is available since iOS 10.0 Like the following code if (@available(iOS 11, *)) { //Available on iOS 11 } else { ...
- (UIColor *)randomColor { CGFloat hue = ( arc4random() % 256 / 256.0 ); // 0.0 to 1.0 CGFloat saturation = ( arc4random() % 128 / 256.0 ) + 0.5; // 0.5 to 1.0, away from white CGFl...
//Get the sandbox home directory path NSString *homeDir = NSHomeDirectory(); //Get the Documents directory path NSString *docDir = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDo...
Preface First, let me pay tribute to the authors of RSA For the principles of RSA asymmetric encryption and all that…, please Baidu it yourself The Detour Recently my development work invol...
Clang Static Analyzer The Clang compiler (the compiler Xcode uses) ships with a static analyzer that performs control flow and data flow analysis on your code, catching many issues the compiler ...
Preface Recently I’ve been working on SDK development. Sometimes you can’t easily remove an API because some people are still using it. So to keep the relevant method while marking it as deprecat...
Effect Today my friend (Wang Kecheng) discovered that Xcode has a very convenient feature — you can debug and run on a real device wirelessly. Take a look at this image. Configuration Step 1: ...
Preface This chapter covers AVAsset metadata (which can be simply understood as the model information of an audio format such as mp3: title: xxxx, artist: Andy Lau, album: Love You for Ten Thousa...