Protocal


web.h

@protocol sendingData <NSObject>
-(void)dataresponse:(NSMutableDictionary *)dictionary;

@end


@property (nonatomic,strong)id<sendingData>delegate;

web.m
if ([self.delegate respondsToSelector:@selector(dataresponse:)]) {
                           [self.delegate dataresponse:self.responseDictonary];
                       }

vc.m
web *web=[[WebMethod alloc]init];
    web.delegate=self;


-(void)dataresponse:(NSMutableDictionary *)dictionary{
    NSLog(@"%@",dictionary);
}
Previous
Next Post »