one The commonly used

1. Use the shortcut keys Shift + Command + K to eject the keyboard

2. Pt in iOS and DP in Android are essentially the same concept. They both mean independent pixels, but they are called differently

3. Format code: Select the code, Control + I

4. Delete the command+ rollback key

5. Copy a line: Control + Shift + Arrow key, copy and paste.

6. Open the snippets shortcut control+ Shift +L

7. Replace shortcut keys: Command +option+f

8.Xcode Copies files to another project: Drag files from one Xcode project to another Xcode project

9.Xcode Code Smart tip: ESC

10. Find the snippets location: Xcode Settings, click the right arrow behind the path to find the CodeSnippets folder.

11. Find useage shortcut key :^+1

12. Handy front-end notes: (1) HTML controls the structure of the web page, CSS controls the appearance of the web page, javascript controls the behavior of the web page (2) DOM operation, can be simply understood as “element operation” (3) javascript events, functional programming

two Close the keyboard

1. Textfield, textView, close keyboard delegate also need to be configured in xiB.

3. Variable parameter

1. In variable parameters, separate all parameters with commas (,)

Four. entrust

Delegate, callback, observer mode. The core of this is upward transformation (the implementation of the interface receives the parameters passed and adjusts its own methods).

Five. notes

1.ARC will release objects only if there is no strong pointer to them. Nil, empty, clear pointer. 3. Protocol is used to declare methods (like interfaces)

System startup failure after Mac update: Log out of the AppleID account and log in again in system preferences, and then restart the system

Six. OC

1. Classes in OC correspond to structures, and objects in OC are Pointers

2. The () in OC is used to enclose data types.

Methods in OC that have arguments must be preceded by the type of each argument:

The colon is also part of the method name

OC allows you to attach a label to each parameter, which is also part of the method name

Object methods can directly access properties (member variables), class methods cannot.

Calling class methods is more efficient than calling object methods

Class methods and object methods can call each other

3. Class methods (+) can only be called with class names, and object methods (-) can only be called with objects. Methods must be declared under braces, not within braces

4. The definition method is similar to the function defined by C, which can also be declared and implemented

.(point syntax) access class attributes, essentially call set, get methods. -> Access the member variable, but the member variable is protected by default and must be set to public manually

5. The string in OC is an object. %@ is used to output object types

6.OC object contains reference counter (4 bytes)

7.ARC Automatic reference Count MRC Manual reference count

8. The principle of memory management is that adding is subtracting. An alloc corresponds to a release and a retain corresponds to a release