One of the reasons why I chose to become an iOS developer is because of Xcode and the language it uses, Swift. For one, Swift has less syntax than the Java in my experience. Also, Xcode has an amazing interface and I like using storyboard in Xcode.
In this blog, I’ll share some tips and tricks that I learned from a boot camp for Xcode and Swift which can make your coding experience easier. There is also pdf for some of the shortcuts, so you can print it out and tape it on the wall as you’re working.
Xcode Keyboard Shortcuts
There are a number of reasons why you should be using keyboard shortcuts. Of course, one of them is because it’s faster to use keyboard shortcuts rather than switching from keyboard to mouse. Another reason why you should consider keyboard shortcuts is because of R.S.I. (Repetitive Syndrome Injury).
RSI can have major repercussions such as preventing you from typing or doing basic tasks such as opening doors or doing laundry. This can cost you your career and livelihood.
A way to prevent RSI is good posture and reducing alternating mouse and keyboard movements.
Here is a pdf of Xcode Keyboard Shortcuts.
I personally printed this sheet out and pull it out when I’m working on Xcode to help me with coding.
Some other shortcuts I like using:
- Command + alt + L
Gets the UI Label.
- Command + =
Makes the size fit your label.
- Command + R
Runs your program.
Swift Cheat Sheet
Another is a Swift Cheat Sheet that I also got from my boot camp from London Brewery. It’s mostly for beginners but pretty helpful!
Download it here.
It basically includes:
- Arrays + Dict
- If + For Loop
I hope this helps you!