先提供幾個以下的快捷方式,我在開發中常常用到的.atom
// 定義強指針類型 @property (nonatomic ,strong) <#type#> *<#name#>; // 定義弱指針類型 @property (nonatomic ,weak) <#type#> *<#name#>; // 定義基本數據類型 @property (nonatomic ,assign) <#type#> <#name#>; // 定義 NSString 文本類型 @property (nonatomic, copy) <#type#> *<#name#>; // 定義計數器類型(主要用在 MRC 工程中) @property (nonatomic ,retain) <#type#> *<#name#>; /** * 每行顯示什麼內容 * * @param tableView tableView * @param indexPath * * @return cell */ -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ static NSString *ID = <#ID#>; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID]; if (!cell) { cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ID]; } return cell; } /** * 懶加載 */ - <#methodName#>{ if (_<#methodName#> == nil) { self.<#methodName#> = <#initCode#>; } return _<#methodName#>; }
上面的這幾種快捷提示方式我都是常常用到的,只要把上面這些拷貝到你的項目中的.m/.h 文件中就能直接用,具體方法以下spa
打開這個解決,暴力辦法,直接拖過去,會出現以下界面:指針
這樣就設置好了,你只要輸入你Comletion Shotcut 裏面的 strong 就能完整的打出來這麼一串.是否是很方便?code
著做權聲明:本文爲做者原創,歡迎轉載分享。請尊重做者勞動,轉載時保留該聲明和做者博客連接,謝謝!ci