gpt4 book ai didi

ios - 如何调整 4inch theos-application

转载 作者:行者123 更新时间:2023-11-29 10:43:27 25 4
gpt4 key购买 nike

我想用theos制作应用程序,但它似乎不适合4inch iPhone/iPod。我该如何解决这个问题?

当我在下面编写代码并安装时, View 变成了这个截图。

#import "RootViewController.h"

@implementation RootViewController
- (void)loadView {
self.view = [[[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease];
self.view.backgroundColor = [UIColor whiteColor];
}

- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
UIButton *btn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btn setTitle:@"Button" forState:UIControlStateNormal];
btn.frame = CGRectMake(0,0,100,100);
[self.view addSubview:btn];
[btn release];

CGRect jbrect = [UIScreen mainScreen].bounds;
NSString *jbstr = [[NSString alloc] initWithFormat:@"%f,%f,%f,%f",jbrect.origin.x, jbrect.origin.y, jbrect.size.width, jbrect.size.height];

UIAlertView *jbalert = [[UIAlertView alloc] initWithTitle:@"Called!" message:jbstr delegate:nil cancelButtonTitle:@"cancel" otherButtonTitles:nil];
[jbalert show];
[jbalert release];

}
@end

enter image description here

最佳答案

有一个非常简单的解决方案:只需在“资源”文件夹中添加一个黑色的 .png 图像并将其命名为“Default-568h@2x”,如 this one .

关于ios - 如何调整 4inch theos-application,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23337197/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com