Xcode Setting Question

Discussion in 'Mac Programming' started by iGrant, Sep 21, 2006.

  1. macrumors 6502a

    iGrant

    Joined:
    Sep 20, 2006
    Location:
    Abingdon
    #1
    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
     
  2. macrumors 68040

    mduser63

    Joined:
    Nov 9, 2004
    Location:
    Salt Lake City, UT
    #2
    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.
     
  3. thread starter macrumors 6502a

    iGrant

    Joined:
    Sep 20, 2006
    Location:
    Abingdon
    #3
    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.
     

Share This Page