你的位置:首页 > 操作系统

[操作系统]iOS Assigning to idXXXDelegate from incompatible type BViewController *__strong


在使用代理的时候,

  BViewController *BVC = [[BViewController alloc]init];  self.delegate = BVC;

 出现这样的警告Assigning to 'id<XXXDelegate>' from incompatible type 'BViewController *__strong'

解决方案:

#import "BViewController.h"@interface BViewController ()<XXXDelegate>@end

 在BViewController.h中 添加:XXXDelegate 即可