Short and useful Objective-C snippets?

前端 未结 9 1625
逝去的感伤
逝去的感伤 2021-01-30 07:27

Since XCode 4, there is now a Code Snippets section which offers the snippets via auto-complete when typing. I\'d be very interested in snippets you all have stored in there. Wh

相关标签:
9条回答
  • 2021-01-30 08:02

    I’m often adding private class interfaces with class extensions:

    @interface <#ClassName#> ()
    @end
    

    This is to keep the public interface completely free from internal stuff, especially now that we can have purely synthesized properties (example gist).

    0 讨论(0)
  • 2021-01-30 08:11

    While debugging this snippet is really useful. It let you know Class Name, Function Name and you can add your comments also.

    NSLog(@"%s [Line %d] %@ ", __PRETTY_FUNCTION__, __LINE__,<#comment#>);
    
    0 讨论(0)
  • 2021-01-30 08:11

    This is the Blog, that I have created for the same purpose...

    http://ios-funda.blogspot.in/

    0 讨论(0)
提交回复
热议问题