MediaBrowser
- language: Swift 5
- platform: ios
- device: iphone
- license: MIT
Tag
Download
Introduction
Also, MediaBrowser use latest SDWebImage version for caching, motivated by MWPhotoBrowser
Installation
Cocoapods
pod 'MediaBrowser'
pod 'MediaBrowser'
Carthage
github "younatics/MediaBrowser"
github "younatics/MediaBrowser"Usage
Basic
Get MediaBrowser and set MediaBrowserDelegate
let browser = MediaBrowser(delegate: self)
self.navigationController?.pushViewController(browser, animated: true)
//MediaBrowserDelegate
func numberOfMedia(in mediaBrowser: MediaBrowser) -> Int {
return mediaArray.count
}
func media(for mediaBrowser: MediaBrowser, at index: Int) -> Media {
if index < mediaArray.count {
return mediaArray[index]
}
return DemoData.localMediaPhoto(imageName: "MotionBookIcon", caption: "Photo at index is Wrong")
}
Get
MediaBrowser and set MediaBrowserDelegatelet browser = MediaBrowser(delegate: self)
self.navigationController?.pushViewController(browser, animated: true)
//MediaBrowserDelegate
func numberOfMedia(in mediaBrowser: MediaBrowser) -> Int {
return mediaArray.count
}
func media(for mediaBrowser: MediaBrowser, at index: Int) -> Media {
if index < mediaArray.count {
return mediaArray[index]
}
return DemoData.localMediaPhoto(imageName: "MotionBookIcon", caption: "Photo at index is Wrong")
}

