I am using a UITableViewController to display a table. When an item is selected in the table, I want to display a small GUI that asks for username and password. I have created the GUI using a xib file and IB and here is how I display it.
Code:
PasswordView *pv = [[PasswordView alloc] initWithNibName:@"PasswordView" bundle:[NSBundle mainBundle]];
pv.modalPresentationStyle = UIModalPresentationFormSheet;
[pv setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
[self presentModalViewController:pv animated:YES];
[pv release];
pv = nil;
The GUI is displayed correctly but the problem is that the size is way bigger than what I have set via IB.
I've even tried putting the following code in view class, but that did not help
Code:
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
self.view.frame = CGRectMake(0, 0, 200, 200);
}
return self;
}
I'm using Xcode 4.0 and the target device is an iPad
thanks for your help
Dhoti