-
Notifications
You must be signed in to change notification settings - Fork 158
Home
Stephan Yannick edited this page Apr 5, 2016
·
1 revision
Use in Swift :
extension MNArticleViewController: ASMediasFocusDelegate {
func parentViewControllerForMediaFocusManager(mediaFocusManager:ASMediaFocusManager) -> UIViewController {
return self.parentViewController!
}
func mediaFocusManager(mediaFocusManager:ASMediaFocusManager, mediaURLForView:UIView) -> NSURL {
guard let urlString = content?.url,
let url = NSURL(string:urlString) else {
return NSURL()
}
return url
}
func mediaFocusManager(mediaFocusManager:ASMediaFocusManager, titleForView:UIView) -> String {
guard let media = content?.description else {
return ""
}
return description
}
}
mediaFocusManager.delegate = self
mediaFocusManager.installOnView(headerView.getBackgroundImageView())
mediaFocusManager.setDefaultDoneButtonText("Fermer", withColor: UIColor.whiteColor())