Training „git“
07.10.2010 - 08.10.2010, Essen
Training „Eclipse RCP“
28.03.2011 - 01.04.2011, Dortmund

Einführung in UIKit: UIView und UIViewController

Standard-Typen CoreGraphics, UIKit

Auszug UIView Klassenhierarchie

UIView Klassenhierarchie

Beispiel UIView

UIView* view = [[UIView alloc] initWithFrame:CGRectMake(x, y, width, height)];
[parentView addSubview:view];
[view release];

UIView Frames und Bounds

Beispiel UILabel

UILabel* aLabel = [[UILabel alloc] initWithFrame:CGRectMake(x, y, width, height)];
aLabel.text = @"Hello world";
[parentView addSubview:aLabel];
[aLabel release];

Beispiel UIButton

UIButton* button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
button.frame = CGRectMake(x, y, width, height);
NSString* title = [NSString stringWithFormat:@"1 + 1 is %i", 1 + 1];
[button setTitle:title forState:UIControlStateNormal];
[self.view addSubview:button];

UIViewController

UIViewController

Über Ihre Kommentare und Hinweise freue ich mich sehr:
Ralf Ebert | iPhone-Entwicklung | Einführung in UIKit: UIView und UIViewController