mirror of
https://github.com/ichmagmaus111/ghostgram.git
synced 2026-11-19 13:14:09 +01:00
Ghostgram for iOS, rebuilt from scratch on Telegram iOS 13.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
25 lines
668 B
Swift
25 lines
668 B
Swift
//
|
|
// UIImageView+Utils.swift
|
|
// GraphTest
|
|
//
|
|
// Created by Andrei Salavei on 4/9/19.
|
|
// Copyright © 2019 Andrei Salavei. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
extension UIImageView {
|
|
func setImage(_ image: UIImage?, animated: Bool) {
|
|
if self.image != image {
|
|
if animated {
|
|
let animation = CATransition()
|
|
animation.timingFunction = CAMediaTimingFunction.init(name: .linear)
|
|
animation.type = .fade
|
|
animation.duration = .defaultDuration
|
|
self.layer.add(animation, forKey: "kCATransitionImageFade")
|
|
}
|
|
self.image = image
|
|
}
|
|
}
|
|
}
|