随着大量的Xcode新手的涌入,我相信会有很多Xcode的技巧和技巧可以分享。
你的呢?
随着大量的Xcode新手的涌入,我相信会有很多Xcode的技巧和技巧可以分享。
你的呢?
当前回答
能够快速查看可以从超类中重写的所有方法。例如,当扩展UITableViewController时,我只需要输入我的实现:
- ta
然后我按ESC键,看到我的超类中所有以“ta”开头的方法,比如
- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
这也适用于采用协议。
其他回答
Cmd+Option+O to open a file in a separate window. Can configure Tab to always indent. I frequently use it to indent an entire file. Ctrl+Arrow keys to move between camel case words. If you have OneTwo, you can move from One to Two with Ctrl+Right arrow. You can use emacs bindings, there's even kill ring! I use the Ctrl+w and Cmd+C together when I need to copy two different pieces of text. In the documentation browser, you can restrict your searches to a particular library, e.g., just iOS 4.2 library. This helps me focus on API available only on a particular iOS/Mac version of the SDK. Cmd+Shift+A to build and analyze.
构建成功/失败噪音;从术语:
defaults write com.apple.Xcode PBXBuildSuccessSound ~/Library/Sounds/metal\ stamp.wav
defaults write com.apple.Xcode PBXBuildFailureSound ~/Library/Sounds/Elephant
alt -左&右转到行尾/开始。这与ctrl -左&右一起移动到下一个大写字母或换行字。这两个帮我省了不少时间
显示打开符号的选择器
⌘+“+”` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `
显示
您可以选择在以下方式打开符号:
当前选项卡 在现有的选项卡中 在一个新的(+在右上角) 在垂直分割(与+在右边)或 在一个新的窗口(与+在左边)。
重命名多个项目共享的文件:
打开所有项目。 重命名一个项目中的文件。 Xcode自动调整所有打开的项目,以反映文件的新名称。