Analysis of underlying principle of NSObject

NSObject is the root class of most class hierarchies in Objective-C. usually, when using NSObject objects, we will use [[NSObject alloc] init] or [NSObject new] to create object instances. Through this article, we will study the object creation process of NSObject together. initialization Call alloc mode When we call the [NSObject alloc] ...

Posted by dotMoe on Mon, 21 Feb 2022 12:14:35 +0100

KVO principle analysis

preface *** KVO official document link I Share some details about KVO 1.context function First, let's take a look at the description of context addObserver:forKeyPath:options:context: the context pointer in the message contains any data, which will be returned to the observer in the corresponding change notification. You can specify NULL ...

Posted by LuiePL on Sun, 02 Jan 2022 21:05:24 +0100