iOS:Xcode Overview1 && 界面 操作

--参考:(Xcode Overview) https://developer.apple.com/library/ios/documentation/ToolsLanguages/Conceptual/Xcode_Overview/About_Xcode/about.html  + <Xcode Basics Help>

============Workspace Window============

--组成:Toolbar  + Editor area  + Navigator area + Debug area + Utility area;

--相关界面:Navigator selector Bar + standard editor、Assistant editor、Version editor + Jump Bar;

------------Utility area------------

1.组成:Inspector selector bar -> Inspector pane ->Library selector bar ->Library pane ->Filter bar

--Inspector selector bar说明:

a.File inspector(always visible):View and manage metadata for a file, such as its name, type within your project, and so forth(文件);

b.Quick Help(always visible):View details about a symbol, including a concise description, where and how it is declared, its scope, the parameters it takes, and its platform and architecture availability(帮助);

c.Identity inspector:View and manage metadata for an object, such as its class name, accessibility information, runtime attributes, label.....(身份标识/对象)

d.Attributes inspector:Configure attributes of the selected interface object. The attributes available are specific to the selected object. For example, some text field attributes include text alignment and color, border type, and edit ability(属性).

e.Size inspector:Specify characteristics such as the initial size and position, minimum and maximum sizes, and autosizing rules for an interface object(大小位置)

f.Connections inspector:View the outlets and actions for an interface object, make new connections, and break existing connections(连接)

g.Bindings inspector:Create, view, and configure bindings for view objects(绑定)

h.Effects inspector:Specify settings for animation, alpha channel, transitions, and other visual characteristics of a selected object(效果)

------常用操作:

--Organizer Window:Devices organizer + Projects organizer + Archives organizer 

--Multiple Tabs or Multiple Windows: File > New > Tab/window;

============code、resource============

--Settings to a Target:参考文章《Xcode Build Setting》

--Settings to project:参考文章《Xcode Build Setting》

============write code============

--部分参考:http://www.cnblogs.com/elfsundae/archive/2011/05/10/2038440.html(初窥Xcode4)

--Keyboard Shortcuts(快捷键)整理如下:

-------界面-------

       调整

1.Navigator/Utility/Debug area:Command-0、Option-Command-0、Option-Command-Y;

2.Assistant Editor:Option-Command-Enter、Command-Enter;

3.全屏:Ctrl +Command +F;

        切换:

--Project Navigator:在Navigator area中切换到Groups & Files,Command+1;Command+4也非常有用,查看错误;

--new Window/tab:  Command-T、Shift-Command-T;

--Open a File Quickly: Shift-Command-O;

--关闭窗口:Command+w、Command+shift+w;

--移动光标:@+上箭头/下箭头/左箭头/右箭头;Command+文首/文末/行首/行末;Option+ 上行/下行/前一单词/后一单词;Ctrl + 上一屏/下一屏;

--Jump to Next Counterpart:类似与之前的Switch To Header/Source File,Ctrl+Command+上箭头/下箭头;

--Navigator area go back/forward:Ctrl+Command+左箭头/右箭头;

--Code Folding/Unfold:Option +Command+左箭头/右箭头(Option +Command+上下箭头没有操作);

--Reveal in Project Navigator:在导航区域的项目组定位并选中当前正在编辑的文件,Command+shift+J;

--在Navigator中查找:Navigator area底部的文件过滤(查找),Command+option+J;

--在Navigator中查看最近文件:Navigator area底部有‘show only recent files’按钮;

--在Library中查找:库过滤(查找),Command+option+L;

--查看定义/帮助文档:Option-Command-click 对比 Command-click;

--Source Editor Help ->Show All Help Topics;

-------编码-------

--Show completions:显示自动完成列表,代码补全,Esc 或者ctrl+space;

--Re-Indent:在Editor-structure菜单中,快捷键不清楚。

--Comment Selection:在Editor-structure菜单中,注释所选的内容或光标所在行,command + /;

--上/下/左/右移动代码:在Editor-structure菜单中,Shift right/left、Move Line Up/Down移动所选的内容或光标所在行。快捷键command + [、option+command + [其他俩类似;

--项目中查找:Command+shift+F;

--查找上/下一个:Command+g、Command+shift+g;

--Stop:Command + .;

--Code Analysis : Shift-Command-B;

--Clear Console:清理控制台,Command+K;

        编辑

Edit in Scope:对象是multiple lines of text,一般用于方法内(选中某变量时候,Xcode很难自动出现操作菜单,可以用快捷键Control+command+E,Editor菜单中)  

Find+Replace:对象是instances of a text 用于全局文本替换 

refactor-->rename:主要用于类改名(文件名字也能修改过来)、不同文件里的对象改名;

refactor-->extract:对象是code fragment,代码块移植,将某个代码块封装为一个方法xx,原来代码块地方变成[ self  xx]调用;

--Drop Code Snippets into Your Files:小段代码;

--Create Source Files from Templates:dragging its template to the project navigator(从库中拖拽);

--Balance Delimiter:在Editor-structure菜单中,可以查看某变量/语句所在作用域(背景改变);

--双击某符号,选中该符号所占区域。“单目”的符号就是选中该符号,但是“双目”的({/[)的符号就会将俩者之间区域选中,对于代码较多方法或复合语句查看很有用;

备注:

1.在项目中查找的时候,在输入框中点击“放大镜”图标,选择insert Pattern,可以输入一些正则表达式

--------------------------------------------------------附:Xcode Preferences--------------------------------------------------------

------Color:

--plain text:灰白(220,220,220);

--Attributes:暗灰色(85,125,125)

--NSString:红色(255,0,0)

--Characters + Number:默认淡紫色(125,110,190) 

--keywords:暗紫(190,19,125)

--Preprocessor Statement +URLS + Project/Other Preprocessor Macros:橙色(255,125,0);

--注释:绿色(0,255,0)

--系统类/方法/实例变量:暗青色(0,160,190);
--自定义类/方法/实例变量等:淡青色(0,190,160)

未用:黄色(255,255,0) + 蓝色(0,0,255)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值