Showing
1 changed file
with
10 additions
and
1 deletions
@@ -166,11 +166,13 @@ static const NSUInteger kDomainSection = 1; | @@ -166,11 +166,13 @@ static const NSUInteger kDomainSection = 1; | ||
166 | 166 | ||
167 | // Setup toolbar | 167 | // Setup toolbar |
168 | UINavigationBar *bar = [[[UINavigationBar alloc] init] autorelease]; | 168 | UINavigationBar *bar = [[[UINavigationBar alloc] init] autorelease]; |
169 | - [[self view] addSubview:bar]; | 169 | + [bar setAutoresizingMask:UIViewAutoresizingFlexibleWidth]; |
170 | 170 | ||
171 | UINavigationItem *navItem = [[[UINavigationItem alloc] init] autorelease]; | 171 | UINavigationItem *navItem = [[[UINavigationItem alloc] init] autorelease]; |
172 | bar.items = [NSArray arrayWithObject:navItem]; | 172 | bar.items = [NSArray arrayWithObject:navItem]; |
173 | 173 | ||
174 | + [[self view] addSubview:bar]; | ||
175 | + | ||
174 | // Setup the title | 176 | // Setup the title |
175 | if ([self type] == ASIProxyAuthenticationType) { | 177 | if ([self type] == ASIProxyAuthenticationType) { |
176 | [navItem setPrompt:@"Login to this secure proxy server."]; | 178 | [navItem setPrompt:@"Login to this secure proxy server."]; |
@@ -199,12 +201,19 @@ static const NSUInteger kDomainSection = 1; | @@ -199,12 +201,19 @@ static const NSUInteger kDomainSection = 1; | ||
199 | [self setTableView:[[[UITableView alloc] initWithFrame:f style:UITableViewStyleGrouped] autorelease]]; | 201 | [self setTableView:[[[UITableView alloc] initWithFrame:f style:UITableViewStyleGrouped] autorelease]]; |
200 | [[self tableView] setDelegate:self]; | 202 | [[self tableView] setDelegate:self]; |
201 | [[self tableView] setDataSource:self]; | 203 | [[self tableView] setDataSource:self]; |
204 | + [[self tableView] setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight]; | ||
202 | [[self view] addSubview:[self tableView]]; | 205 | [[self view] addSubview:[self tableView]]; |
203 | 206 | ||
204 | // Force reload the table content, and focus the first field to show the keyboard | 207 | // Force reload the table content, and focus the first field to show the keyboard |
205 | [[self tableView] reloadData]; | 208 | [[self tableView] reloadData]; |
206 | [[[[[self tableView] cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]].contentView subviews] objectAtIndex:0] becomeFirstResponder]; | 209 | [[[[[self tableView] cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]].contentView subviews] objectAtIndex:0] becomeFirstResponder]; |
207 | 210 | ||
211 | +#if __IPHONE_3_2 && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_3_2 | ||
212 | + if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { | ||
213 | + [self setModalPresentationStyle:UIModalPresentationFormSheet]; | ||
214 | + } | ||
215 | +#endif | ||
216 | + | ||
208 | [[self presentingController] presentModalViewController:self animated:YES]; | 217 | [[self presentingController] presentModalViewController:self animated:YES]; |
209 | } | 218 | } |
210 | 219 |
-
Please register or login to post a comment