Toggle navigation
Toggle navigation
This project
Loading...
Sign in
iOS
/
asi-http-request
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
NanoTech
2010-06-17 15:02:30 -0600
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0a50f3185e5b79189d432fbcdf0ddd5a1a712e42
0a50f318
1 parent
5424eb48
Present the auth dialog as a form sheet.
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
Classes/ASIAuthenticationDialog.m
Classes/ASIAuthenticationDialog.m
View file @
0a50f31
...
...
@@ -166,11 +166,13 @@ static const NSUInteger kDomainSection = 1;
// Setup toolbar
UINavigationBar
*
bar
=
[[[
UINavigationBar
alloc
]
init
]
autorelease
];
[
[
self
view
]
addSubview
:
bar
];
[
bar
setAutoresizingMask
:
UIViewAutoresizingFlexibleWidth
];
UINavigationItem
*
navItem
=
[[[
UINavigationItem
alloc
]
init
]
autorelease
];
bar
.
items
=
[
NSArray
arrayWithObject
:
navItem
];
[[
self
view
]
addSubview
:
bar
];
// Setup the title
if
([
self
type
]
==
ASIProxyAuthenticationType
)
{
[
navItem
setPrompt
:
@"Login to this secure proxy server."
];
...
...
@@ -199,12 +201,19 @@ static const NSUInteger kDomainSection = 1;
[
self
setTableView
:[[[
UITableView
alloc
]
initWithFrame
:
f
style
:
UITableViewStyleGrouped
]
autorelease
]];
[[
self
tableView
]
setDelegate
:
self
];
[[
self
tableView
]
setDataSource
:
self
];
[[
self
tableView
]
setAutoresizingMask
:
UIViewAutoresizingFlexibleWidth
|
UIViewAutoresizingFlexibleHeight
];
[[
self
view
]
addSubview
:[
self
tableView
]];
// Force reload the table content, and focus the first field to show the keyboard
[[
self
tableView
]
reloadData
];
[[[[[
self
tableView
]
cellForRowAtIndexPath
:[
NSIndexPath
indexPathForRow
:
0
inSection
:
0
]].
contentView
subviews
]
objectAtIndex
:
0
]
becomeFirstResponder
];
#if __IPHONE_3_2 && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_3_2
if
(
UI_USER_INTERFACE_IDIOM
()
==
UIUserInterfaceIdiomPad
)
{
[
self
setModalPresentationStyle
:
UIModalPresentationFormSheet
];
}
#endif
[[
self
presentingController
]
presentModalViewController
:
self
animated
:
YES
];
}
...
...
Please
register
or
login
to post a comment