Find out who's Who's agent first (delegate)Define proxy protocols, naming conventions for protocol names: control class name + DelegateDefining proxy methodsProxy methods are generally defined as @optionalProxy method names begin with the control
The primary operation for nsmutablestring mutable strings is to create, add, delete, insert, replaceThe code operates as follows:1 //2 //main.m3 //03-nsmutablestring4 //5 //Created by Ma C on 15/8/17.6 //Copyright (c) 2015 BJSXT. All rights reserved.
NSNumber Basic Data Type wrapper class://Main.m04-nsnumber//Created by Ma C on 15/8/17.Copyright (c) 2015 BJSXT. All rights reserved.//#import int main (int argc, const char * argv[]){@autoreleasepool{NSNumber Test (basic data wrapper class)NSNumber
The UI elements (buttons, lists, pictures ...) that we can see on the screen when we use the app, which we call views, are inherited and UIView, they usually have properties such as location, size, background color, and in Appl View and window show
1, the definition of the class:Add files in Xcode, choose Cocoa Class or Cocoa Touch classEnter the class name person and select the parent class as NSObjectThe following two files are generated by defaultPerson.h person.h// classandobject////
Important knowledge point personal understanding recordThe first article: OC is the message structure language, runtime parsing, compile-time not careArticle Two: Introduction of the head file try not to. h file (compilation trouble), where to
//Main.min OC. Grammar//Created by won't tell you who I am on 15-8-9.Copyright (c) year Xuqigang. All rights reserved.//#import #import "Test01.h"@interface Test01:nsobject//{int A;@public int b;int C;//}@property int C;-(void) print;int Main (int
Nsmutablearray modifies elements, using -insertobject:atindex: and -replaceobjectatindex:withobject: All can, that is, by inserting ( Insert) and replacement (replace) can be implemented.Example://Reduce button monitoring- (void) Onsubbtnpressed:
Initialize object allocation memory + (ID) alloc;
The birth of an object is essentially a large enough memory from the operating system to hold all the instance variables of the class and designate it as the location of the instance
Appearance modeThe design pattern is the same as the adapter, but it has a different granularity to the object control, and the adapter generally controls the docking of a system and client. The façade is used to abstract multiple systems working
Introduction to the excellent OBJECTIVE-C project on GitHubMake a brief introduction to the current GitHub top projects, so that you get a quick overview of some of Objective-c's best open source frameworks.
Project Name
Project
Object orientedObject-oriented (object-oriented) is based on process-oriented (procedure-oriented)Object-oriented Emphasis object OC, Java language is object-orientedProcess oriented C language is process orientedObject-oriented is a programming
Explain:The Nsarray class has two restrictions. First, it can only store objective-c objects, not the original C-language underlying data types, such as the random pointers in int, float, enum, struct, and Nsarray. Also, you cannot store nil (0 or
SuperIn Objective-c, if we need to invoke a method of the parent class in a method of a class, we usually use Super, as follows:@interface Myviewcontroller:uiviewcontroller @end @implementation Myviewcontroller-(void) viewdidload { [super
Http://www.cocoachina.com/ios/20150617/12148.htmlOverviewSince the launch of the WWDC 2015 and the Open source Swift 2.0, everyone's enthusiasm for Swift has soared again, while the envious startups ' friends talk about Swift's new features, as well
In oC, nil, nil, null, and nsnull may often occur. The differences are as follows:
Symbol
Value
Meaning
Null
(Void *) 0
Literal null value for C pointers
Nil
(ID) 0
Literal null value for
Four access controllers of member variables in objective-C:
@ PRIVATE: only the current class can be accessed internally.
@ Public: All users can access
@ Protected: only the current class and its subclass can be accessed.
@ Package: allow member
The code block is essentially similar to other variables. The difference is that the data stored in the code block is a function body. Using code blocks, you can pass in the number of parameters and get the return value just like calling other
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service