Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I indent something like this??? #75

Open
liuzhen2008 opened this issue Jul 12, 2017 · 3 comments
Open

How do I indent something like this??? #75

liuzhen2008 opened this issue Jul 12, 2017 · 3 comments

Comments

@liuzhen2008
Copy link

I just started writing objective c recently. This indentation is crazy.

How do I deal with something like this?

Note that this "alert" variable is already nested under 3 levels. So xocd automatically tries to wrap text if too long.

Where do i start a new line? where should the message:@"" start?


                UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"Broadcast Invite"
                                                                               message:@"Do you want to join??."
                                                                        preferredStyle:UIAlertControllerStyleAlert];

@funkyboy
Copy link
Contributor

That's the "standard" way. You can use 2 spaces indentation to "ease the pain" :)

@liuzhen2008
Copy link
Author

But this is "colon align"? It is absolutely horrible =/ and this doc doesn't seem to support it either?

@funkyboy
Copy link
Contributor

Put your code in Xcode, select it and then Ctrl+I. That's the "canonical" alignment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants