0

我正在尝试在 Swift 中为 MWPhoto 框架(在此处找到)实现这些委托方法。

- (NSUInteger)numberOfPhotosInPhotoBrowser:(MWPhotoBrowser *)photoBrowser;
- (id <MWPhoto>)photoBrowser:(MWPhotoBrowser *)photoBrowser photoAtIndex:(NSUInteger)index;

我已经在下面编写了这些方法,但我的控制器告诉我它仍然不符合委托方法。

func numberOfPhotosInPhotoBrowser(photoBrowser: MWPhotoBrowser) -> Int {
    return self.photos.count
}


func photoBrowserphotoAtindex(photoBrowser:MWPhotoBrowser, index:Int) -> (MWPhoto?){
    if(index < self.photos.count){
        return self.photos[index]
    }
    return nil;
}
4

0 回答 0