If you want to learn OC but have no Mac computer classmate, you can try the following methods to solveWe use GNUstep to learn Objective-cFirst step: Install the required software and build the environmentsudo apt-get install gnustepsudo apt-get
1. Notification Center (Nsnotificationcenter)1.1. Each application has a notification hubs (nsnotificationcenter*) instance that is dedicated to assisting with message communication between different objects1.2. This is the Observer pattern
Empty lines are not required before and after @interface,@implementation , and @end . If you declare an instance variable in the @interface , you must have an empty line after the closing parenthesis } .Space vs. tabUse only spaces, and indent two
Create a new Xib file describing the internal structure of a view (assumed to be called mjtgcell.xib)Create a new custom class(Custom classes need to inherit from the system's own view, which class to inherit from, depending on the Xib root object's
1. An object-oriented person knows that self equals this,super equivalent to calling a method of the parent class2.self is a hidden parameter of the class, pointing to the class that is currently calling the method, and another hidden parameter is
These days to move a logic from the server to the client, basically is to translate JS into OC. Direct contrast, obviously feel OC is too rotten (for the language itself, iOS app framework does not do)For example, the following line of JS code:var
单例类是一种特殊的类,在一个进程种只会存在一个该类的对象,在iOS应用中只会出现一个对象。这种设计模式在系统框架中许多地方都使用了,如NSFileManager、UIApplication等。">单例类是一种特殊的类,在一个进程种只会存在一个该类的对象,在iOS应用中只会出现一个对象。这种设计模式在系统框架中许多地方都使用了,如NSFileManager、UIApplication等。">A singleton class is a special class in which only
A dictionary is a collection of data that holds a mapping relationship (Key-value pairs). A key-value is considered an entry (Entry), and the dictionary is a container for storing key-value pairs.Features of the Dictionary classUnlike arrays,
The framework refers to Objective-c's foundation library, which gives several common classes and their methods in the following example.
Numeric objects
NSNumber *Intnum; NSNumber*Longnum; NSNumber*Floatnum; Intnum= [NSNumber
KVC key value pair is later in the development of the project will often use, if it is not clear that is key, that is value, then it will be very disadvantage, I personally is in this area to eat a lot of loss, especially in the Address book. Maybe
Nsset to tell the truth, the application of this class, still do not know when the end will be used, first over the brain, after the need to use the time, not unfamiliar!#import int main (int argc, const char * argv[]) {@autoreleasepool {Create 4
Today the main practice nsstring nsmutablestring Nsarray NsmutablearrayNSString ( string)Method 1: [[NSString alloc] initwithformat:@ ""] creates a string object, formats it, and assigns a value to the string object method 2:stringwithformat:@ ""
Operators can be divided into the following types:Arithmetic operators: +,-, *,/,%,++,—-。Relational operators: ,=,==,!=Boolean logical operators:! , &&,| |Bitwise operator:|,&,^,~,>>,Assignment operators: + =,-=, *=, =/Conditional
1. Main function2. Uiapplicationmain* Create UIApplication objects* Create a UIApplication delegate object3.1 Delegate agent starts processing (listening) system events (No Storyboard)* When the program is started, the agent's
1.1-(void) layoutsubviews;* When a control's frame changes, it is automatically called* Typically here the child controls inside the layout (set the child control's frame)* Be sure to call Super's Layoutsubviews method1.2-(void) Didmovetosuperview;*
1.UIPickerView1.1. Common Properties of Uipickerview//data source (used to tell Uipickerview how many columns there are rows)@property (nonatomic,assign)IDDataSource;//agent (used to tell Uipickerview what to display on every 1 rows of every 1
"Introduction to environmental construction"The development environment must be built on Apple's Mac OS system. So whichever way you do, you need at least one computer with a Mac OS system in place.You can get Mac OS by buying an Apple computer or
Although the grammar of objective-c is so different, so that beginners so uncomfortable, but in fact, it still has a lot of advantages (mainly compared to JAVA).Protocol protocalIn fact, it is the interface, but because OC in the definition of class
(Iphone/ipad) on the relationship between release and nil in Objective-cCategory: Iphone/ipad development technology 2011-12-09 01:40 2515 people reading reviews (4) favorite reports Uiviewcrashnull TerminalNotice that there is often one such
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.