Mac OS is a UNIX-based operating system.
A basic technique of 1. Allow apps from any source to be installed
General purpose, security and privacy, System Preferences
Select any source from the Allow applications downloaded from the following location.
2. After you install your Mac using a virtual machine, the resolution is adaptive to the screen
If the host has a screen resolution of "1920 * 1080". The virtual machine is set--Display--Check specify monitor settings, and the maximum resolution for any monitor is "1920 * 1080".
3. Reformat the disk
Finder, and go to--use the tools--disk utility to erase the recognized hard drive.
4. Xcode Displays line numbers
Open the upper left corner of Xcode and click Xcode, then go to preferences and select "Text Editing" to tick "Show line Numbers".
5. Display full file name
Click "Finder" to select "preferences", pop Up "preferences" window, select "Advanced", then tick the show all file extension options.
6. XCode setting theme and font size
Preferences (Preferences), "XCode", in the pop-up window, select "Font & Colors" and choose the theme you like.
7. Turn off Arc
The Xcode project opens the arc by default, and if you use the object's retain, Xcode appears error: ' Retaincount ' is unavailable:not available in automatic reference count ing mode.
Problems with compilation options:
1. Click on the project name to open the compile options
2. In the Compile options, select the Bulid setting tab
3. In the apple LLVM compiler 3.0-language project, find the ojective-c Automatic Reference couting option (search directly for the item or arc)
4. Change the default yes to No.
8 Open Zombie Object
Product, scheme, Edit Scheme, diagnostics select ' Enable Zombie Objects '
Two XCode simulator 1 mobile phone simulator scaled proportionally
50%, Simulator, Window,
2. #pragma mark
#pragma mark does not belong to OC, he is strictly a marker tool in Xcode. Literal meaning is called: a practical mark. The main purpose is to quickly locate the code and make the code more readable. and can be defined anywhere in the document.
If you are using #pragma mark alone, a line is generated in the Navigation bar section
3. Simulator Switching Application
Commond + SHIFT + Press H to switch to home home directory 1 times
Commond + SHIFT + Press H 2 times multi-reference toggle
4. Common shortcuts for simulators
Commond + R Start simulator
Commond +. Stop simulator
Commond + <-App left
Commond + Apply Right
5. Common shortcuts in projects
Commond + N Create a new file
6. Common shortcuts for XCode IDE
1. Documents
CMD + N: New file
CMD + SHIFT + N: New Item
CMD + O: Open
CMD + S: Save
Cmd+opt+s: Save All Files
CMD + SHIFT + S: Save As
CMD + W: Close window
CMD + Q: Exit Xcode
CMD + SHIFT + W: Close file
2. Editing
CMD + [: Left Indent
CMD +]: Right Indent
Cmd+shift+f: Find in Project
Cmd+g: Find the next
Cmd+shift+g: Find Previous
Ctrl + F: Move forward cursor
Ctrl + B: Move the cursor back
Ctrl + P: Move the cursor to the previous line
Ctrl + N: Move the cursor to the next line
Ctrl + A: Move the cursor to the beginning of the line (replace the home button)
Ctrl + E: Move the cursor to the end of our line (replace the end key)
Ctrl + T: Swap the characters on the left and right side of the cursor
Ctrl + D: Remove the character to the right of the cursor
Ctrl + L: Places the insertion point in the middle of the window
Ctrl + K: Delete Bank
Ctrl +. : Parameter Hints
Tab: Accept Code hints
ESC: Show Code hints menu
CMD +/: Comment or Uncomment
CMD + CTRL + left collapse
CMD + CTRL + right to cancel folding
CMD + CTRL + TOP collapse all functions
CMD + CTRL + BOTTOM cancel all function folding
CTRL + U Cancel collapse All
CMD + D Add bookmark
3. Commissioning
CMD + \: Set or Cancel breakpoints
CMD + OPT + \: Allows or disables the current breakpoint
CMD + OPT + B: View all Breakpoints
CMD + RETURN: Compile and run (determines whether breakpoints are enabled based on settings)
CMD + R: Compile and run (without triggering breakpoints)
CMD + Y: Compile and debug (trigger breakpoint)
CMD + SHIFT + RETURN: Terminate run or debug
CMD + Alt + P: Continue (in debug)
CMD + Alt + 0: Skip
CMD + Alt + I: Jump in
CMD + Alt + T: Jump out
CMD + B: Compile
CMD + SHIFT + K: Cleanup
4. Form
CMD + SHIFT + B: Compile window
CMD + SHIFT + Y: Debug Code Window
CMD + SHIFT + R: Debug Console
CMD + SHIFT + E: Main edit window adjustment å
5. Help
CMD + OPT +?: Development Manual
CMD + CTRL +?: Quick Help
6, Xcode code formatting/automatic layout:
Xcode version: Version after 4.2
Select the need to format code, Editor, Structure->re-indent or
Select the need to format code, right-click, and select Structure->re-indent
7. Mobile Code
Commond + OPTION + [check code, move the code up
Commond + OPTION +] Check the code and move the code down
8. Folding Code
Commond + Opton + around key code folding
9. Simulator Picture Zoom
The zoom of the Commond + option image, which appears two points, controls the scaling of the image by adjusting two points.
7. Introduction of external. m files, resource files
An. m file inside the project is not available, check Build Phase-Compile Sources
A resource file within the project (such as plist, audio, etc.) cannot be used, check Build Phase Copy Bundle Resources
8. Remove the automatic layout of the UIView
Select the UIView attribute you want to work with and remove the check for use Auto Layout.
Three common UNIX directives
Because the Mac system is UNIX-based, you can enter some UNIX instructions in the terminal to operate the MAC system, such as: Create a new File/folder and open a file/folder.
Ls-l List All contents (Files/folders) under the current directory
PWD Displays the name of the current directory
CD changes the directory of the current operation
WHO displays the current user name
Clear Clear Screen
mkdir Create a new directory
Touch creates a new file (creates a new file if the file does not exist)
Open opens a File/folder
Click tab to create a command name, a file name, and a folder name can be automatically confused.
In the process of using UNIX instructions, directory (path) operations are often involved, and several paths with special meanings are listed below.
/root Path
./Current Path
.. /upper-level path
Four common software
1 Dash API document management tool.
A summary of Mac & XCode usage Tips