Once I start editing my code and adding for loops or if then statements my code indentation is whacked because the previous code maintains its former indentation instead of
Xcode 9.2:
You can select text and press ctrl + i to re-indent code.