0
這是我如何加載XIB視圖爲子視圖:設置子視圖幀大小
UIViewController *nameController = [[NameSubViewController alloc] initWithNibName:@"NameSubViewController" bundle:nil];
UIView *subView = [nameController view];
[self.view addSubview:subView];
但隨後佔據了整個屏幕。我怎樣才能使子視圖幀的大小與XIB相同? (320×350)
像的CGRect 50,50,320,350