やっとできたー。本のとおりから少し変形したらできなくなるとか…もうね…orz
XxxAppDelegate.hで、
/*XxxAppDelegate.h*/ @interface XxxAppDelegate : NSObeject<UIApplicationDelegate>{ UIWindow *window; UIViewController *controller; }
/*XxxAppDelegate.h*/ @synthesize controller; (中略) controller = [[MainViewController alloc]initWithNibName:@"MainView" bundle:[NSBundle mainBundle]];
って宣言してたんだけどインクルードファイルが問題だった様子。貼り付けるViewのサブクラスをMainViewControllerとするとき、ここはUIViewControllerではなくMainViewControllerとすべき、らしい。
ここをUIViewControllerにしていると、"loaded the "*" nib but the view outlet was not set."とか"unrecognized selector sent to instance xxx"とかいわれるらしい。前者のほうは違う原因の気もするけれども…。