Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

iGrant

macrumors 6502a
Original poster
Sep 20, 2006
542
0
Ridgeway
Hello,

I am currently learning Xcode, or I really should say I am learn Objective-C, and then Xcode. However here is my question. There is an option in Xcode right now under preferrences to tell Xcode what to do with "{". I original learned Java, and then I learned a little C and from my experience I noticed some differences in way people use spacings. Here is what Xcode does default:

if(sum >= 60){ <-- This is what Xcode is doing now
return true;
}

Here is what I would like it to do
if(sum >= 0)
{ <-- I would like the "{" to be here
return true;
}

Other than hitting enter is there a way to does this????

Thanks
iGrant
 

mduser63

macrumors 68040
Nov 9, 2004
3,042
31
Salt Lake City, UT
I'm not sure there's a way to make Xcode automatically put the opening brace on the next line. I just hit enter before typing a brace. I've got the preferences set up so that Xcode automatically creates a closing brace, indents the brace(s) by 1 space and positions the cursor between the two braces.
 

iGrant

macrumors 6502a
Original poster
Sep 20, 2006
542
0
Ridgeway
See I have that set too, I just was wondering if someone figured out what to put in that field to make it automatically go to the next line.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.