InstaGallery 是一种简单的方式来访问您的 Instagram 帐户,并在几个步骤中获取您的图库和媒体。
Info.plist
文件InstagramClientId
的新键,并将您的 Instagram 应用程序 ID 设置到这个键中InstagramRedirectURI
的新键,并设置为您的 Instagram 应用程序重定向 URIInstagramClientSecret
的键,并设置为 Instagram 应用程序密钥。InstaGallery.gallery
初始化 GalleryController
。如果您需要检索选定的媒体,您需要使用可选参数 delegate
设置 GalleryDelegate
委托。例如let galleryController = InstaGallery.gallery(withDelegate: self)
let navigationController = UINavigationController(rootViewController: galleryController)
present(navigationController, animated: true, completion: nil)
InstaGallery 可通过 CocoaPods 获取。要安装它,只需将以下行添加到您的 Podfile 文件中
pod 'InstaGallery'
然后,运行 pod install
Swift Package Manager 是一个用于自动化 Swift 代码分发的工具,并已集成到 swift
编译器中。
一旦您设置好 Swift 包,将 Alamofire 添加为依赖项就像将其添加到您的 Package.swift
文件的 dependencies
值中一样简单。
dependencies: [
.package(url: "https://github.com/MRodSebastian/InstaGallery.git", .upToNextMajor(from: "0.4.0"))
]
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)