Create an Empty Application step in XCode 4 (create and associate the xib view file)
4. Open “MainWindow.xib” in project navigator 5. Click “File’s Owner” in “Placeholders” Change Class as “UIApplication” in “Identity Inspector” 6. Drag “Object” in the library into “Objects” panel on the left 7. Change the class of the Object as your delegate class, such as “DemoAppDelegate” (The name of object will be automatically change like “Demo App Delegate”) 8. Drag “Window” in the library into “Objects” panel on the left
9. Open “DemoAppDelegate.h” in project navigator 10. Find below code
@interface DemoAppDelegate :
UIResponder
@property (strong, nonatomic)UIWindow *window;
@end
11. Change as below:@interface DemoAppDelegate :
UIResponder
@property (strong, nonatomic) IBOutlet UIWindow *window;
@end
11. Open “MainWindow.xib” in project navigator 12. Click “File’s Owner” in “Placeholders” 13. Control-Drag “delegate” of “Outlets” in “Connections Inspector” to “Demo App Delegate” in “Objects” 14 . Click “Demo App Delgate” in “Objects” 15. Control-Drage “window” of “Outlets” in “Connections Inspector” to “Window” in “Objects”16. Open “Summary” of your project 17. Find “iPhone/iPod Deployment Info” 18. Change “Main Interface” as “MainWindow”
19. Open “DemoAppDelegate.m” in project navigator 20. Find below code
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
return YES;
}
21. Change as below- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
//self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
return YES;
}
——- Finish ——–Repost: http://chrislee.kr/wp/2011/07/24/mainwindow-xib-absence-in-xcode-4-2-beta-4-with-ios-5-sdk/
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
localStorage에 객체를 추가하는 방법은 무엇입니까?이 노트에서는 localStorage에 객체를 삽입하는 방법을 보여드리겠습니다. 경우에 따라 로컬 스토리지 또는 세션 스토리지에 데이터를 개체로 저장해야 할 수 있습니다. 어떻게 이것을 달성할 수 있습니까? 객체가 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.