//[self returnViewController];
(UIViewController*)returnViewController {
CGRect calendarFrame = CGRectMake(0, 0, 320, 568);
calendarFrame.size.height -= 44;
CalendarViewController *calendar=[[CalendarViewController alloc]init];
calendar.view.frame=calendarFrame;
return calendar;
}
//bug
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "CalendarView" nib but the view outlet was not set.'
1, 打開xib文件
2, 點擊"File‘s Owner",設置Class為xxxViewControler
3, 右鍵"Files‘s Owner", 裡面有個默認的IBOutlet變量view, 看一下後面有沒有做關聯,如果沒有就拉到下面的View和視圖做個關聯