How arrays are usedHere is the array: type Nsarray1 #import2 #import "AppDelegate.h"3 4 intMainintargcChar*argv[]) {5 6 //creating an array with the @ symbol7Nsarray *arr = @[@"Hello",@"Jinpangpang"];8 9 //creating an array from a
explains the meaning of the modifier in parentheses behind the property : Nonatomic Non-thread-safe non-atomic operation is characterized by high efficiency of operating variables Atomic Thread -safe atomic Operation is characterized by
Delegate Delegate in iOS design modeThe official documentation is explained below:Delegation is a simple and powerful the pattern in which one object in a program acts on behalf of, or in coordination with, a Nother object. The delegating object
The program files are divided into header files (. h) and implementation files (. m);
Use the #import keyword to import the desired header file into the program, and you can avoid the program repeatedly referencing the same header file;
First, Brief introductionUitabbarcontroller and Uinavigationcontroller Similar, Uitabbarcontroller can also easily manage multiple controllers, easy to complete the switch between the controller, the typical example is QQ, etc.Second, the use of
Protocolinterface is the declaration of a class header file that is not the meaning of the interface in the real sense. Protocol is the OC interface.Role:用来声明一些方法也就是说,一个prtocol是由一系列方法声明组成的。Syntax format:@protocol 协议名 //方法的声明列表@end
Class
Category is one of the most commonly used functions in objective-c.The category can add methods to existing classes without adding a subclass.The standard syntax format for the category interface is as follows:[CPP]View Plaincopy
#import
Following
void print ();
};
Class ac{
};
At this time, the AI and AC are independent, AC does not have to build a relationship with the AI to compile the error, the following modifications to the AC, the AI
one or three ways to import files are compared: @class, import, include in the preceding paragraph of the class:1, the use of @class class name, it will tell the compiler has such a class, currently do not need to know its internal instance
The objective-c is similar in this respect to C + +. Quotation marks are given to local files that are contained locally. (You need to indicate relative paths relative to the existing file). For angle brackets, it is a global path.
Quotation marks
Add sub-interface in ScrollView.. directly on the code.Self.navigationController.navigationBar.translucent =NO; Firsttableviewcontroller*FIRSTVC =[[Firsttableviewcontroller alloc] init]; Secondtableviewcontroller*SECONDVC
Tableview+scrollview
Add label to cell
Ways to solve ghosting
Delete element when reusing cell
Nsarray *subviews = cell.subviews;For (UIView *view in subviews) {[View Removefromsuperview];}
In the IF
Objective-c, usually writing OBJC and less used Objective C or OBJ-C, is an object-oriented programming language that expands C. It is mainly used in Mac OS X and GNUstep, which use the OpenStep standard system, and it is the basic language in
———————————————————————————————————————————Multiple object memory management (wild pointers & memory leaks)(Note: This part of the knowledge should be combined with "single object memory Management" to understand)This part of the knowledge is
main functions:UIContol(控件是所有控件的基类 如:(UIButton)按钮主要用于与用户交互,通常情况下我们不会直接使用UIControl,而是子类化它。Common Properties:BOOL enabled 空间默认是启用的,要禁用控件,可以将enabled属性设置为NO,这样将导致控件会略任何触摸控件事件。被禁用后,控件还可以用不同的方式显示自己,such as turning gray is not available. It is done by
NSBundle Introduction: It is a singleton class that is used to load resources (2011-09-22 17:51:37)reproduced
Tags: gossip
Category: IOS
A bundle is a directory that contains the resources that the program will use.
Association Association refers to associating two objects together so that one of them is part of another object.The affinity attribute is only available on Mac OS X V10.6 and later versions. In addition to the class's definition for adding
The content size of the variable group Nsmutablearray is variable, so its common operation is nothing more than adding and removing the check,Some of them are: Create, add, delete, replace, insert, empty, etc...//Main.m02-nsmutablearray//Created by
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.
Foundation frameworkNSString, Nsmutablestring, NSNumber (Basic data Type wrapper class), Nsvalue (special type wrapper class: pointer, array, struct), Nsarray, Nsmutablearray, Nsdectionary, Nsset and so on.
one, immutable string NSString
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