Showing posts with label iOS Programming. Show all posts
Showing posts with label iOS Programming. Show all posts

Thursday, March 24, 2022

Every iOS developer should know these Xcode tricks

 As iOS Developer you must be spending 8-9 hours of the day using Xcode. It is really important that you know the IDE to get most out of it and get more efficient with coding.

Refresh Canvas and close/open canvas


While using SwiftUI one of things you interact most is SwiftUI previewer and we see the Resume button on the previewer and have to click it to so many times. 



Well there is a keyboard shortcut that can make your life easier. By default it is set to Option + Command + P but you can reconfigure it your liking. e.g. I have set it to Command + P


and to do this I had to remove the shortcut for Print. Let's be very clear we do not do Print command from Xcode every day :), So I choose the nearest key to the default one.

Another good shortcut to know if Opening and closing the Canvas, May be there are times where you want to just focus on code and get some more real estate to work with and just want to close the canvas and then once done you want to reopen it again. You can use Option + Command + return to toggle the canvas visibility. Again you can use Xcode keybinding to reconfigure it to your liking.

Open Quickly

If you are working on large project and working on few files then you must know this feature of Xcode. Open quickly let's you open files with you know the name of the file. Press Command + Shift + O to open it and then just start trying the name and you will see the list


A companion option to this one is show only recent files toggle in the project navigator. When enabled it will only show the files you have recently interact with. 



Rename refactoring