Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 
avatar of J.A.

J.A.

J.A. has asked 0 questions and find answers to 1 problems.

Stats

21
EtPoint
6
Vote count
0
questions
1
answers

About

Display GIF in Cocoa Mac OS X development Xcoce 8.3.2 (2017)

For me it works only if there is nothing set in the Attribute Inspector and with the code like that (hope, it will be useful for someone):

class FirstViewController: NSViewController {  

  @IBOutlet weak var imgImage1: NSImageView!

 override func viewDidLoad() {
        super.viewDidLoad()

let imgImage1 = NSImageView(frame: NSRect(x: 407, y: 474, width: 92, height: 74))
        imgImage1.canDrawSubviewsIntoLayer = true
        imgImage1.imageScaling = .scaleProportionallyDown
        imgImage1.animates = true
        imgImage1.image = NSImage(named: "mygif")
        self.view.addSubview(imgImage1)
}

Enjoy :)

J.A. questions