可以在单个类中创建多个委托。我在不同的视图控制器中使用这些委托方法。另一种方法是将委托方法创建为optional
,并创建一个delegate
。哪个是最佳的?
protocol FinalPresentImageInViewControllerDelegate:class {
func finalImagePresent(image:UIImage!)
func finalViewControllerClossed()
}
protocol WillPresentImageDelegate:class {
func viewControllerImagePresent(image:UIImage!)
}
protocol ImageViewPresentDelegate:class {
func selectAlbumView(selectDeviceAlbum:DevicePickerAlbum!,selectPhAssertCollection: PHAssetCollection!,selectFacebookAlbum:FacebookAlbum!)
func instragramLoginView()
func facebookLogin(result:Bool)
}