MWPhotoBrowser를 사용하여 내 앱에 단일 이미지를 표시하고 있습니다. 메인 스토리 보드의 MWPhotoBrowser에 내 View Controller 클래스를 설정했는데 다음 코드를 추가했지만 이미지가로드되지 않습니다.MWPhotoBrowser가 웹 URL에서 이미지를로드하지 않습니다.
let photos = NSMutableArray()
let photo = MWPhoto(URL: NSURL(string: "http://images.nationalgeographic.com/wpf/media-live/photos/000/911/cache/man-ocean-phytoplankton_91111_600x450.jpg"))
photos.addObject(photo)
self.photos = photos
self.displayActionButton = true
self.displayActionButton = true;
self.displayNavArrows = true;
self.displaySelectionButtons = true;
self.alwaysShowControls = true;
self.zoomPhotosToFill = true;
self.enableGrid = true;
self.startOnGrid = true;
self.enableSwipeToDismiss = true;
그리고 위임 방법입니다. MWPhoto
이 MWPhotoProtocol
준수,
'func photoBrowser (photoBrowser : MWPhotoBrowser !, photoAtIndex index : UInt) -> MWPhotoProtocol! { 를 반환합니다. photos.objectAtIndex (Int (index)) as! MWPhotoProtocol }'이 메서드는? –