这就是我将 XIB 视图加载为子视图的方式:
UIViewController *nameController = [[NameSubViewController alloc] initWithNibName:@"NameSubViewController" bundle:nil];
UIView *subView = [nameController view];
[self.view addSubview:subView];
但随后它占据了整个屏幕。如何使子视图帧大小与 XIB 相同?(320 x 350)
像 CGRect 50, 50, 320, 350