iphone,addSubview显示视图太高,如何移动到下?
我在我的应用程序中使用了两次addSubView,两次它都将视图添加到视图的上方太高了,它在顶部脱离屏幕。见下文。。。我加载了像这样的视图,因为我没有其他工作,导致我的问题 我只是不明白他们为什么在屏幕上炫耀 我需要做什么来解决这个问题iphone,addSubview显示视图太高,如何移动到下?,iphone,xcode,Iphone,Xcode,我在我的应用程序中使用了两次addSubView,两次它都将视图添加到视图的上方太高了,它在顶部脱离屏幕。见下文。。。我加载了像这样的视图,因为我没有其他工作,导致我的问题 我只是不明白他们为什么在屏幕上炫耀 我需要做什么来解决这个问题 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [window addSubvi
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[window addSubview:rootController.view];
[window makeKeyAndVisible];
lvc = [[GettingStartedViewController alloc]
initWithNibName:@"GettingStartedView" bundle:nil];
[window addSubview:lvc.view];
return YES;
}
在我的GettingStartedView中
- (IBAction) showHelp:(id)inSender {
theController = [[HelpViewController alloc] initWithNibName:@"HelpView"
bundle:nil onPage:HelpPageGettingStarted];
[self.view addSubview:theController.view];
}
检查根视图控制器的
wantsFullScreenLayout
属性,确保其未设置。检查根视图控制器的wantsFullScreenLayout
属性,确保其未设置。设置位置:
rootController.view.frame = CGRectMake(0, 20, 320, 460);
设置位置:
rootController.view.frame = CGRectMake(0, 20, 320, 460);
rootController在didfishlaunchingwithoptions?嗯,这还不是一个完整的句子。请更加明确和描述性,我不知道你想问我什么:-)伟大的答案!也解决了我的问题!rootController在didfishlaunchingwithoptions?嗯,这还不是一个完整的句子。请更加明确和描述性,我不知道你想问我什么:-)伟大的答案!也解决了我的问题!didFinishLaunchingWithOptions中的rootController?您可以在那里设置它,或者只取消选中.xib文件中的复选框。didFinishLaunchingWithOptions中的rootController?您可以在那里设置它,或者只取消选中.xib文件中的复选框。