Swift playgrounds with UIImage

前端 未结 11 1875
轻奢々
轻奢々 2020-12-01 01:36

I am working with Xcode 6, and I\'m trying to recreate the code demoed during session 401 \"What\'s new in Xcode 6\". I\'ve added an image to Images.xcassets (called Sample)

11条回答
  •  庸人自扰
    2020-12-01 02:34

    This is what worked for me on Xcode Version 6.1.1.

    1. Create Playground file under same directory as main storyboard.

      Folder Structure

    2. Open Utilities pane for Playground file, and click the right arrow in Resource Path section to add your images in that directory.

      Resource Path for Playground

    3. Test image within Playground file.

      Result

提交回复
热议问题