網頁

2012年3月12日 星期一

Xcode 4 xib




專案 Summery 的 Main Interface   決定MainWindow.xib 開空window時記得加(易忘)

File's owner  Class 選 UIApplication    

拉Objects 修該其name
Objects Custom Class 選 Delegate file (.h .m)

File's owner的 inspector 下的outlet 下的Delegate 拉向object (名稱會顯示Objects Custom Class 的name)

註解 預設Delegate.h
 //self.window.backgroundColor = [UIColor whiteColor];

避免按Home 會消失

Object 接 Delegate
Delegate 連 window
-----
砍掉view
拉Tab Bar Controller




.h

@interface tryWindowsAppDelegate : UIResponder <UIApplicationDelegate>
{
    UITabBarController *table;
}

@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) IBOutlet UITabBarController *table;

.m 下

AppDelegate.m

@synthesize table;
 
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
...
       self.window.rootViewController = self.table;
...
}


沒有留言:

張貼留言

注意:只有此網誌的成員可以留言。