[Objective-C] Reference counting

1. Basic concepts: As the name suggests, Automatic Reference Counting (ARC) refers to the technology of automatically counting references in memory management. The following is excerpted from Apple’s official description: The Automatic ReferenceCounting (ARC) mechanism is used in Objective-C to let the compiler perform memory management. Setting ARC to a valid state in the new […]

NetworkMoyaBase objective-c and swift common network packaging library

Overall description The network encapsulation library implemented through Moya and Alamofire adapts to business calls that support objective-c projects and complete swift projects. The data returned by the network is JSON parsed through swiftyJSON, and the oc data structure of the data is implemented through HandyJSON and YYModel respectively. Conversion and conversion of swift data […]

use gnustep objective-c

first app #import <Foundation/Foundation.h> int main(int argc, const char * argv[]) {<!– –> NSAutoreleasePool *pool = [NSAutoreleasePool new]; NSLog(@”first start”); [pool drain]; return 0; } tech Focus on concepts instead of getting lost in language technical details The purpose of a programming language is to become a better programmer; that is, to become more effective […]

[Objective-C] Serious People Today – Classes vs Extensions vs Protocols

[Objective-C] Serious People Today – Classes & Extensions & Protocols Article directory [Objective-C] Serious People Today – Classes vs Extensions vs Protocols Classes and Extensions How to define a category to add methods Calling a private method by forward reference The extension is equivalent to defining an anonymous class Agreement and commission Informal and formal […]

[Objective-C] Classes and objects (below) 1.0

6.1 Objective-C class packaging 1. Class packaging Objective-C is extended from C language, and C language including basic data types (int, float) are not objects, they do not have the characteristics of objects – no properties, methods can be called. Objective-C provides NSValue, NSNumber to encapsulate the basic types of C language, making them object-oriented. […]