ObjecTips

Swift & Objective-C で iOS とか macOS とか

UIImageView

UIGraphicsBeginImageContextWithOptions をやめて UIGraphicsImageRenderer を使うメリット

WWDCのメモリのセッションを見ていたら思わぬTipsについて言及されていた。 WWDC 2018 iOS Memory Deep Dive の20分57秒あたり https://developer.apple.com/videos/play/wwdc2018/416 UIGraphicsBeginImageContextWithOptions を使うのはやめて UIGraphicsI…

UIImageView の画像をフェードインアウトさせて変更する

UIImageView に画像を設定する際にフワッとフェード(ディゾルブ)するようにするには、CALayer に CATransition のアニメーションを加えてやる コードは以下 UIImageView *imageView = self.imageView; imageView.image = image; // 画像を変更 [imageView.…