Author Topic: How to access your app icon as a UIImage from an Asset Catalog  (Read 4033 times)

kjmcneish

  • Administrator
  • *****
  • Posts: 719
    • View Profile
To access your app icon as a UIImage from an asset catalog, you need to specify the name of the image and its size. For example:

In Swift:

Code: [Select]
fbController.addImage(UIImage(named: "AppIcon40x40"))
In Objective-C:
Code: [Select]
fbController.addImage([UIImage imageNamed:@"AppIcon40x40"]);
All the best!
Kevin McNeish
Author of Learn to Code in Swift: https://itunes.apple.com/us/book/learn-to-code-in-swift/id942956811?mt=11
Check out our Robot Tic-Tac-Toe app: https://itunes.apple.com/us/app/robot-tic-tac-toe/id990638517?mt=8
« Last Edit: November 15, 2015, 10:20:32 AM by kjmcneish »