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:18:28 -0600
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e305f0b957092cf4ab15d14dc7b9e1f6732c2e0b
e305f0b9
1 parent
b7bf9cee
Add rotation support to the auth dialog (iPad only for now).
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
Classes/ASIAuthenticationDialog.h
Classes/ASIAuthenticationDialog.m
Classes/ASIAuthenticationDialog.h
View file @
e305f0b
...
...
@@ -13,8 +13,11 @@ typedef enum _ASIAuthenticationType {
ASIStandardAuthenticationType
=
0
,
ASIProxyAuthenticationType
=
1
}
ASIAuthenticationType
;
@interface
ASIAuthenticationDialog
:
UIViewController
<
UIActionSheetDelegate
,
UITableViewDelegate
,
UITableViewDataSource
,
UITextFieldDelegate
>
{
@interface
ASIAutorotatingViewController
:
UIViewController
@end
@interface
ASIAuthenticationDialog
:
ASIAutorotatingViewController
<
UIActionSheetDelegate
,
UITableViewDelegate
,
UITableViewDataSource
,
UITextFieldDelegate
>
{
ASIHTTPRequest
*
request
;
ASIAuthenticationType
type
;
UITableView
*
tableView
;
...
...
Classes/ASIAuthenticationDialog.m
View file @
e305f0b
...
...
@@ -20,6 +20,22 @@ static const NSUInteger kPasswordSection = 0;
static
const
NSUInteger
kDomainRow
=
0
;
static
const
NSUInteger
kDomainSection
=
1
;
@implementation
ASIAutorotatingViewController
-
(
BOOL
)
shouldAutorotateToInterfaceOrientation
:(
UIInterfaceOrientation
)
toInterfaceOrientation
{
#if __IPHONE_3_2 && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_3_2
if
(
UI_USER_INTERFACE_IDIOM
()
==
UIUserInterfaceIdiomPad
)
{
return
YES
;
}
#endif
return
(
toInterfaceOrientation
==
UIInterfaceOrientationPortrait
);
}
@end
@interface
ASIAuthenticationDialog
()
-
(
void
)
show
;
@property
(
retain
)
UITableView
*
tableView
;
...
...
@@ -108,7 +124,7 @@ static const NSUInteger kDomainSection = 1;
-
(
UIViewController
*
)
presentingController
{
if
(
!
presentingController
)
{
presentingController
=
[[
UI
ViewController
alloc
]
initWithNibName
:
nil
bundle
:
nil
];
presentingController
=
[[
ASIAutorotating
ViewController
alloc
]
initWithNibName
:
nil
bundle
:
nil
];
// Attach to the window, but don't interfere.
UIWindow
*
window
=
[[[
UIApplication
sharedApplication
]
windows
]
objectAtIndex
:
0
];
...
...
Please
register
or
login
to post a comment