tags:

views:

395

answers:

1

hi all, i want to show my view as a model view. In iPad there are four method to show the view as modal which is listed 1. Full Screen 2. Page Sheet 3. Form sheet 4. Current Context

i use following code to display the view as model

-(void)OpenContactPicker {                                   
    ABPeoplePickerNavigationController *ContactPicker = [[ABPeoplePickerNavigationController alloc] init];
    ContactPicker.peoplePickerDelegate = self;
    [self presentModalViewController:ContactPicker animated:YES];

    //[self.modalViewController presentModalViewController:ContactPicker animated:YES];
    [ContactPicker release];
}

above code open the view in full screen mode but i want to some different.

Please suggest how can i show this view as Page Sheet or Form sheet or Current Context

A: 

Check the modalPresentationStyle property.

KennyTM
i change the property to form sheet so view is displayed properly in middle. but when i tap on cancel button of model view, then main view interface is not proper
a111
@a111: proper = ?
KennyTM
i open modal view in portrait mode, then shift to landscape mode and then click on cancel button of modal view. This time my main view is visible as portrait in landscape mode
a111
@a111: Maybe it's a bug.
KennyTM
@KennyTM: in SDK?
a111
@a111: Yep. ____
KennyTM