1,在需要实例的地方
//加载一个uiview的作法
[LotteryInvestigationView *lotteryInvestigationView=[[[NSBundle mainBundle] loadNibNamed:@"LotteryInvestigationView" owner:self options:nil] lastObject];
[lotteryInvestigationView setFrame:frame];
[self addSubview:lotteryInvestigationView];
2,file's ower 对应的custom class 为uiview
3,对应的view的custom class 设为你自定义的view类
这样就ok了