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

Modale Dialoge

Alerts

Beispiel Alerts

Beispiel Alerts

UIAlertView *alert = [[UIAlertView alloc] 
                      initWithTitle:@"Title" 
                      message:@"Message" 
                      delegate:nil 
                      cancelButtonTitle:@"Cancel" 
                      otherButtonTitles:@"Other", nil];
[alert show];
[alert release];

Action Sheets

Action Sheet

Beispiel Action Sheet

UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Title"
                delegate:self
                cancelButtonTitle:@"Cancel"
                destructiveButtonTitle:@"Destructive Button"
                otherButtonTitles:nil];

[actionSheet showInView:someView];
[actionSheet release];

Beispiel Action Sheet (UIActionSheetDelegate)

- (void) actionSheet: (UIActionSheet*) actionSheet
         clickedButtonAtIndex:(NSInteger) buttonIndex {

    if (buttonIndex == [actionSheet destructiveButtonIndex]) {
        // ...
    }

}

Modale View-Controller

Beispielcode: Modaler View-Controller mit Navigation-Bar

UIViewController* someViewController = [[SomeViewController alloc] init];
UINavigationController *modalNavController = [[UINavigationController alloc]
        initWithRootViewController:someViewController];

[self.navigationController presentModalViewController:modalNavController
            animated:YES];

[someViewController release];
[navController release];

Weitere Informationen

Über Ihre Kommentare und Hinweise freue ich mich sehr:
Ralf Ebert | iPhone-Entwicklung | Modale Dialoge