Read the Horky classmate's "mixed use objective-c,c++ and objective-c++" blog, I also have some ideas to record, easy to learn in the future1.objective-c/C + +/C depth blending is not a good choice, prone to error, and poorly maintained, and when
The principle of KVO and Nsnotificationcenter in Objective-c is a good implementation of the observation pattern, the following code illustrates the usageThe use of KVO1- (void) Viewdidload {2 [Super Viewdidload];3 //additional setup after
The fastcoding has been packaged two times to make it easier to store and read data and share it with everyoneZxeasycoding Description:Encapsulation of fastcording for easier storage and reading of object dataInstallation:Add Zxeasycoder entire
In the daily coding process, we almost developed the habit of using ID for all the return values of the indeterminate type. Indeed, Because it has a general-purpose pointer feature of the balm, plus instancetype after ios7.0. Many people have not
Objective-c is a simple, powerful and flexible programming language with both object-oriented features and functional programming features. Because it is a C-language vest, that is, objective-c can convert its source code into a pure C language and
I. Archiving and unarchiving in the nscoding agreement(1) Archiving an object that will record all properties of this object to filesystem;(2) unarchiving an object and re-creates the object from data.The strength of the class to archiving and
Objective-c Objects for memory management1. Value types: such as int, float, struct and other basic data types.
Value types are placed in the stack, occupying a contiguous memory space in memory, followed by the advanced post-out principle,
The primary role of a category is to extend functionality, which means adding new methods and not encapsulating attributes.If you want to add an attribute, you can use the associated object helper to implement#import "Test.h" @interface Test (Other)
1, in OC, [] is used to adjust the method,. is also looking for methods, mainly to find the Get method,-> is used to find variables. _p is a direct access to instance variables.2. In OC, the instance variable is a protection class and cannot be
In Java, we often use singleton patterns, which are more commonly used in iOS development, and have recently been considered using singleton mode in iOS development.In the Objective-c, It is necessary to define a static variable in the. m file to
KVC (key-value-coding?) 1, overviewA method that sends or obtains a value as a string to an instance variable or property of an object.2, usageA, take the value@property (readwrite,copy) nsstring * name; Car.h@synthesize NAME;//CAR.MNow, I want to
Inheritance relationships for classes
Compound relationship: Has aInheritance relationship: is aConsider this question:When you write cat and dog classes, you'll find that there are a lot of the same or similar properties and methods in these
Nsattributedstring+heightGet attributedstring ' s height
UIView+tyalertviewPowerful, easy-to-use Alert view or popup view with Controller and window, support Blur effects,custom view and animation
Uiimageview+rotateUiimageview Rotation
Array Class :Ordered collectionNot variableAn array in OC is a container that can manage a series of elements in an orderly manner , with different element types, but must be object types.Initialization Method :1.initWithObjects:2. Convenience
beginsAs long as we use objective-c, we deal with method calls every day. We all know that the method of OBJECTIVE-C resolution is dynamic, but in the bottom of a method is how to find, how the method cache and how the operation is little known.This
Article One: Understanding the origins of the Objective-c languageMessage structures rather than function calls. The difference is that, using the language of the message structure, the code that the runtime should execute is determined by the
NSDate classNSDate is the class that represents the date in the foundation framework, which is used to get the current time, which includes: Month Day, time division, 0 timezone, and time zone. Note that it must be 0 time zone! Common
1. Define and use block1 #import "ViewController.h"2 3 @interfaceViewcontroller ()4 5 @end6 7 @implementationViewcontroller8 9- (void) Viewdidload {Ten [Super Viewdidload]; One A //define block no return value, no parameter -
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.