Links...
 
Reality Distortion Field Theory
0x00000000.net
Monday, September 10, 2007
Apple News:iPhone UIKit, it's Cocoa on ARM

iPhone Hello World Native App

- (void) applicationDidFinishLaunching: (id) unused
{
UIWindow *window;

window = [[UIWindow alloc] initWithContentRect: [UIHardware
fullScreenApplicationContentRect]];

pbCell = [[UIImageAndTextTableCell alloc] init];
[pbCell setTitle: @"Hello world!\n"];

UIPushButton *button = [[UIThreePartButton alloc] initWithTitle:
@"Touch Me"];
buttonCell = [[UITableCell alloc] init];
[buttonCell addSubview: button];
[button sizeToFit];

UITable *table = [[UITable alloc] initWithFrame: CGRectMake(0.0f, 48.0f,
320.0f, 480.0f - 16.0f - 32.0f)];
UITableColumn *col = [[UITableColumn alloc] initWithTitle: @"HelloApp"
identifier: @"hello" width: 320.0f];

[window orderFront: self];
[window makeKey: self];
[window _setHidden: NO];

[table addTableColumn: col];
[table setDataSource: self];
[table setDelegate: self];
[table reloadData];

UINavigationBar *nav = [[UINavigationBar alloc] initWithFrame: CGRectMake(
0.0f, 0.0f, 320.0f, 48.0f)];
[nav showButtonsWithLeftTitle: @"Foo" rightTitle: @"Bar" leftBack: YES];
[nav setBarStyle: 0];

struct CGRect rect = [UIHardware fullScreenApplicationContentRect];
rect.origin.x = rect.origin.y = 0.0f;
UIView *mainView;
mainView = [[UIView alloc] initWithFrame: rect];
[mainView addSubview: nav];
[mainView addSubview: table];

[window setContentView: mainView];
}

Labels: , ,

Tags: apple | ipod | macintosh | Add to Technorati Favorites
By : Mac iPhone UIKit, it's Cocoa on ARM

 

 
 
 

 [Site Map]    
 Apple News    
 Opinion    
 Cocoa Programming    
 Reading List    
 About    
 Home    
 Reality Distortion Field    
 latest apple news iphone    
 latest mac apps news    
 ipad latest news apps    
 iSight Download    
 Best WebCam    
 Screen Capture    
 


Copyright © 1996-2006
All Rights Reserved
Reality Distortion Field Theory

search this site only.