Get Data from XCAsset catalog
I understand that to get images from the asset catalog i can use UIImage(named: "fileName") to do it. however, what if i am getting DATA from the XCAsset catalog? I can't figure this out. I have tried, let url = NSBundle.mainBundle().URLForResource("fileName", withExtension: nil) let data = NSData(contentsOfURL: url!) But it is nil. I do not know how to get data from the XCAssets catalog. If anyone can help me out (googling hasn't helped) please let me know I will be very thankful! Update: Why am I trying to get data from an asset catalog? I dragged an animated gif into the asset catalog. And