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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -