Post

Replies

Boosts

Views

Activity

Swift UI previewDevice does not show iPad
I followed SwiftUI Tutorials:https://developer.apple.com/tutorials/swiftui/building-lists-and-navigationand there s a methodpreviewdeviceto add device name to prview codeshttps://developer.apple.com/documentation/swiftui/view/3278637-previewdevicehere is my code:struct LandmarkList_Previews: PreviewProvider { static var previews: some View { ForEach(["iPhone SE", "iPhone XS Max", "iPad Pro (9.7-inch)", "Apple TV"], id: \.self) { deviceName in LandmarkList() .previewDevice(PreviewDevice(rawValue: deviceName)) .previewDisplayName(deviceName) } } }so when I do the preview, I can see iPhone, but I just see a blank page in iPad
2
0
1.4k
Oct ’19