As i’ve grown as a developer, I’ve developed my own way of styling and managing my ViewControllers and I was hoping there was a way to change the default ViewController. Being able to customize the default ViewController syntax would save me a considerable amount of time down the road.
Question posted in Xcode
Whether you're new to Xcode or an experienced developer, our archive has everything you need to know about this integrated development environment (IDE). From basic functionalities to advanced features, our archive covers a wide range of Xcode-related questions and answers. Browse our archive now and find solutions to your Xcode questions, and take your app development skills to the next level
Whether you're new to Xcode or an experienced developer, our archive has everything you need to know about this integrated development environment (IDE). From basic functionalities to advanced features, our archive covers a wide range of Xcode-related questions and answers. Browse our archive now and find solutions to your Xcode questions, and take your app development skills to the next level
2
Answers
After some investigation and with the help of this post, it appears there's two viable options - coordinator patterns & code snippets
Coordinate Patterns
Tutorial: Custom Xcode Template
Although the coordinator pattern is doing exactly what is being asked, it appears to be a fairly lengthy and complicated process when compared to code snippets
Code Snippet
Awesome Reference: Xcode Snippets
By highlighting all of the code that is defined in my default ViewController, right-clicking, and selecting "Create Code Snippet", I was able to define a new snippet which can be accessed by clicking the "+" on the top right corner of Xcode (with focus being on a swift file and not a storyboard file) You can even define Keywords for the autocompletion to work off of.
As I know you need to create a custom Xcode project template. And your customized ViewController file needs to use this custom Xcode project. It is used for some design patterns sample.
In my opinion if you really use this template again and again worth it creating one otherwise it could be little painful