Commenting out standards when writing iOS apps?

G'Day programmers, I'm from the Java background, but I just started to learn C ++ and Objective-C . I was worried when I had so many different coding styles in third-party Objective-C code. But I am satisfied with the dilemma.

My dilemma is whether to use #pragma tags when encoding an iOS expression? Is this considered good practice? Or is it the programmer’s own choice so that these directives drop out links?

Your experience and experience in the industry will be useful,

thank


  • The content I searched on the Internet basically assumed that #pragma did. But I could not find much information on whether this is considered good practice or not.
+5
source share
2 answers

I usually use #pragma to separate implementations, for example:

#pragma mark UITableViewDelegate Methods

#pragma mark Custom functionality Methods

So, I can see the drop-down menu and go straight to where I want.

+6
source

I also use

 #pragma mark - UISomeDelegate

or

 #pragma mark -

Xcode shares a list of methods with a line in the navigation bar:

Line above UISomeDelegate

+4
source

All Articles