Would like to ask is there a tool in xcode whereby it will check the code format and restructure it in such a way that its much more presentable? Sort of indenting helper, I suppose?
For example
-(void)someMethod {
switch(obj.someString)
{
...
}
}
Is there a helper to change it to
-(void)someMethod {
switch(obj.someString)
{
...
}
}
also when the codes get really long, I want to break them down into different rows.
string = @"example1"; string2 = @"example2"; string3 = @"example3" ...;
i typically use astyle and uncrustify. both are open.
they each have a ton of options. they can add or remove spaces/braces/lines, pad, split, indent, hard wrap, force tab or space indentation and much more.
assuming you have macports, drop this into your terminal to install:
sudo port install astyle
sudo port install uncrustify
since both programs support multiple languages: you will probably want to use uncrustify for objc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With