Learn what XCode snippets are, how to create and use them and how to share them with others and between computers
giftbott SwiftSnippets repository
Sorry. Looks like the author has removed this repository since I made this video.
Here is one that has been pointed out by David Nitzsche-Bell in the comments below.
https://github.com/burczyk/XcodeSwift...
Brian Voon's tutorial on SwiftUI previews:
• Better Previews with PreviewLayout Pr...
My version of Brian's preview
(NOTE: YouTube Video descriptions don't allow angle brackets so if you are going to use this snippet, surround #YourView# with angle brackets.
ForEach([
ColorScheme.light,
ColorScheme.dark
], id :\.self) { scheme in
#YourView#
.colorScheme(scheme)
// .previewLayout(.sizeThatFits)
// .previewDevice("iPhone 8")
// .previewDevice("iPhone 8 Plus")
// .previewDevice("iPhone 11")
// .previewDevice("iPhone 11 Pro")
// .previewDevice("iPhone 11 Pro Max")
// .previewLayout(.fixed(width: 500, height: 800))
}
Stewart Lynch's YouTube Channel
/ stewartlynch
Stewart Lynch's CreaTECH Solutions Website
https://www.createchsol.com
Stewart Lynch's Github page
https://github.com/StewartLynch