wkimage

WKImage always return nil

寵の児 提交于 2020-01-06 03:14:29
问题 Access assets image will always return nil, below is my code and assets catalog screen shot. let image = WKImage(imageName: "sample") print(image.image) This will always prints nil. Update: Updated screen shot 回答1: I found that from your screenshot you are setting the Image Set in Assests.xcassets in the swiftWatch WatchOS target and i think you are use that image for the WKDemo target so you get that nil. Set that Image Set in your WKDemo's Assests.xcassets instead of WatchOS's Assests