How to change opacity of animated gif images in Xcode (Swift 3)?

Relevant code below. I want each image to have a fade-in affect while they appear in the overall animation cycle. When running this code, the gif animation affect works, but the opacity changing code does not. Any help would be greatly appreciated. Thanks!

import UIKit

class View1: UIViewController {

@IBOutlet weak var imageView: UIImageView!

override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.