Skip to content

Instantly share code, notes, and snippets.


v-i-s-h-a-l v-i-s-h-a-l

View GitHub Profile
v-i-s-h-a-l / SwiftUIPreviewDevice
Last active Sep 15, 2020
In SwiftUI with "hot reloading" a view can be previewed alongside editing code. The preview device(s) can be controlled by providing the device name in the PreviewProvider confirming struct. This is the list of all the device names.
View SwiftUIPreviewDevice
/// Source:
/// The above document lacks updates (at the time of writing this code)
/// Some additional devices have been added in this lis
// Please, feel free to fork/comment/contribute:
/// 7th revision: with suggestion from @jayrhynas (twitter)
import SwiftUI
You can’t perform that action at this time.