Search code examples
objective-cioscompiler-directives

Commenting standards while writing iOS applications?


G'Day Programmers, I am from Java background however I have just started learning C++ and Objective C. I was worried when I so lots of different coding style in third party Objective C code. But I am kind a stuck with a dilemma.

My dilemma is whether to use #pragma tags while coding iOS application? Does it considered to be a good practise? Or it is programmer's own choice to have those directive drop down links?

Your expertise and industry experience will be helpful,

Thanks


  • Content I searched on internet were mostly suggesting what #pragma does. But I couldn't find much information regarding whether it is considered to be good practise or not.

Solution

  • I usually use #pragma to separate implementations, like:

    #pragma mark UITableViewDelegate Methods
    
    #pragma mark Custom functionality Methods
    

    So i can look at the drop down menu and go directly to where i want.