c - iOS: Best practice for placing the close brace -


i know, best coding practice have close brace (}) in objective c based enterprise project. define method , condition statements below. please advise, best coding practice in objective c , why. have not seen in apple's coding standard document though.

which correct, close brace should same line or below?

i.

-(void) method {        ....  }  (or)   -(void) method  {       ....  } 

ii.

-(void) method {           if ( ... ) {                 .....           }           else {                 .....           }     }      (or)       -(void) method      {           if ( ... )            {                 .....           }           else            {                 .....           }     } 

i haven't seen standards on code formatting. it's preferential. although tend whatever can reduce whitespace.

for example:

-(void)mymethod{     [self dosomething]; } 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -