iphone,addSubview显示视图太高了,我该如何向下移动? [英] iphone, addSubview show view too high up, how do I move to down?
本文介绍了iphone,addSubview显示视图太高了,我该如何向下移动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的应用程序中使用了两次addSubView,并且两次都将视图添加到视图中太高,它在屏幕顶部。见下文......我加载了这样的观点,因为我没有其他工作,导致我的问题。
I'm using addSubView twice in my app and both times it adds the view too high up the view, its off the screen at the top. See below... I have load the views like this as I nothing else works, cause me problems.
我只是不明白为什么他们在屏幕上炫耀?
I just don't understand why they are showing off the screen?
我需要做些什么来解决这个问题?
What do I need to do to fix this ?
- (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中......
And in my GettingStartedView ...
- (IBAction) showHelp:(id)inSender {
theController = [[HelpViewController alloc] initWithNibName:@"HelpView"
bundle:nil onPage:HelpPageGettingStarted];
[self.view addSubview:theController.view];
}
推荐答案
设置位置:
rootController.view.frame = CGRectMake(0, 20, 320, 460);
这篇关于iphone,addSubview显示视图太高了,我该如何向下移动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文