@interface PlaceView () <MapViewDelegate> {
id placeSelegate;
}
@end
@implementation PlaceView
- (id)init
{
self = [super initWithSearch];
if (self) {
super.delegate = self;
}
return self;
}
# pragma mark public PlaceView
- (void)setDelegate:(id)delegate
{
placeSelegate = delegate;
}
- (void)done
{
if ([placeDelegate respondsToSelector:@selector(placeSelected:)])
{
[placeDelegate placeSelected:[map placeInfo]];
}
}
- Jul 08 Tue 2014 15:08
-
防止繼承的delegate跟原本的衝突(how to extend a protocol for a delegate in objective C)
請先 登入 以發表留言。