2014-07-03 24 views
0

我在我的應用程序中使用MWPhotoBrowser。MWPhotoBrowser - 如何在選擇模式下強制選擇一張照片?

我只需要強制在選擇模式下只選擇一張照片。

有什麼方法或提示,我們可以實現該功能?

在此先感謝!

+0

如果你想單個圖像選擇只有圖像選擇控制器可以做到這一點。你爲什麼使用MWPhotoBrowser? – Pawan

+0

從遠程位置選擇單個圖像?謝謝你,我會搜索一下... – Eusthace

+0

你發現這個用例有什麼好的選擇嗎? –

回答

0

在執行MWPhotoBrowser的委託方法時引入以下更改。

- (void)photoBrowser:(MWPhotoBrowser *)photoBrowser photoAtIndex:(NSUInteger)index selectedChanged:(BOOL)selected { 
    for (int i=0;i<selectedPhotos.count;i++) 
    { 
     [selectedPhotos replaceObjectAtIndex:i withObject:[NSNumber numberWithBool:NO]]; 
    } 
    [selectedPhotos replaceObjectAtIndex:index withObject:[NSNumber numberWithBool:selected]]; 
}