theos를 사용하여 응용 프로그램을 만들고 싶지만 4inch iPhone / iPod가 조정되지 않은 것 같습니다. 이 문제를 어떻게 해결할 수 있습니까?
아래에 코드를 작성하여 설치하면이 스크린 샷과 같이 보입니다.
#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
아주 간단한 해결책이 있습니다. "Resources"폴더에 검은 색 .png 이미지를 추가하고 이름을 "Default-568h @ 2x"로 지정 하면 됩니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다