SwiftGif
v1.7.0: Many fixes
لم تعد هذه المكتبة محفوظة. أوصي باستخدام GIFU بدلا من ذلك.
امتداد صغير UIImage مع دعم GIF.

import SwiftGifOrigin
// An animated UIImage
let jeremyGif = UIImage . gif ( name : " jeremy " )
// A UIImageView with async loading
let imageView = UIImageView ( )
imageView . loadGif ( name : " jeremy " )
// A UIImageView with async loading from asset catalog(from iOS9)
let imageView = UIImageView ( )
imageView . loadGif ( asset : " jeremy " ) تثبيت Cocoapods مع الأمر التالي:
gem install cocoapods دمج Swiftgif في مشروع Xcode الخاص بك عن طريق إنشاء Podfile :
platform :ios , '9.0'
use_frameworks!
target '<Your Target Name>' do
pod 'SwiftGifOrigin' , '~> 1.7.0'
end قم بتشغيل pod install لبناء تبعياتك.
تثبيت قرطاج مع homebrew باستخدام الأمر التالي:
brew update
brew install carthage أضف السطر التالي إلى Cartfile لإضافة Swiftgif:
github "bahlo/SwiftGif" ~> 1.7.0
قم بتشغيل carthage update لإنشاء الإطار وسحب SwiftGif.framework المصمم إلى مشروع XCode الخاص بك.
سهل ، يفعل ما يلي:
$ xcodebuild
-project SwiftGif.xcodeproj
-scheme SwiftGif
-sdk iphonesimulator
-destination "platform=iOS Simulator,name=iPhone 8"
build test
CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=""
هذا المشروع مستوحى بشدة من giF من Uiimage-from. مجد إلى mayoff. ؟
تم ترخيص هذا المستودع بموجب ترخيص معهد ماساتشوستس للتكنولوجيا ، وأكثر بموجب الترخيص.