美文网首页
005-Xcode使用与调试

005-Xcode使用与调试

作者: Yasic | 来源:发表于2017-11-26 19:17 被阅读12次

    Xcode使用与调试

    • 首行缩进
      • 选中代码文本,右键出现上下文菜单,Structure -> Re-Indent,可以整理代码
      • 按下 command + [ 或者 command + ] 可以整段代码左移右移
    • 代码缺省补全
      • 按 esc 打开或关闭代码提示
      • control + . 键向后翻页,shift + control + . 键向前翻页
    • 批量编辑
      • command + shift + F 进行搜索
      • 右键局部变量选择“Edit all in Scope”,进行批量修改
      • 光标放在类名上,选择 edit -> refactor -> rename,可以修改类名
    • 代码导航
      • control-F 光标前移
      • control-B 光标后移
      • control-P 光标上移一行
      • control-N 光标下移一行
      • control-A 光标移动到行首
      • control-E 光标移动到行尾
      • control-T 交换光标左右字符
      • control-D 删除光标右一位字符
      • control-K 删除光标后全部字符
      • control-L 快速找到光标
    • 代码折叠
      • option + command + (->) / (<-) 折叠代码块
      • shift + option + command + (->) / (<-) 折叠方法或函数
    • 获取提示信息
    • 点击某个位置查看检查器内容
    • option + 单/双击
    • 调试
      • 在代码中加断点
      • 运行时鼠标移动到变量可以查看值或修改值
      • step over
      • step into
      • step out

    相关文章

      网友评论

          本文标题:005-Xcode使用与调试

          本文链接:https://www.haomeiwen.com/subject/qrhlbxtx.html