forked from pokeb/asi-http-request
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Starting point for new iPhone and iPad sample app
- Loading branch information
Showing
35 changed files
with
2,349 additions
and
2,900 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
// | ||
// AuthenticationViewController.h | ||
// iPhone | ||
// Part of the ASIHTTPRequest sample project - see http://allseeing-i.com/ASIHTTPRequest for details | ||
// | ||
// Created by Ben Copsey on 01/08/2009. | ||
// Copyright 2009 All-Seeing Interactive. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
#import "SampleViewController.h" | ||
@class ASIHTTPRequest; | ||
|
||
@interface AuthenticationViewController : UIViewController { | ||
IBOutlet UISwitch *useKeychain; | ||
IBOutlet UISwitch *useBuiltInDialog; | ||
IBOutlet UILabel *topSecretInfo; | ||
ASIHTTPRequest *requestRequiringAuthentication; | ||
ASIHTTPRequest *requestRequiringProxyAuthentication; | ||
@interface AuthenticationViewController : SampleViewController { | ||
|
||
ASIHTTPRequest *request; | ||
|
||
UISwitch *useKeychain; | ||
UISwitch *useBuiltInDialog; | ||
UITextView *responseField; | ||
} | ||
- (IBAction)fetchTopSecretInformation:(id)sender; | ||
|
||
@property (retain) ASIHTTPRequest *requestRequiringAuthentication; | ||
@property (retain) ASIHTTPRequest *requestRequiringProxyAuthentication; | ||
@property (retain, nonatomic) ASIHTTPRequest *request; | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// DetailCell.h | ||
// Part of the ASIHTTPRequest sample project - see http://allseeing-i.com/ASIHTTPRequest for details | ||
// | ||
// Created by Ben Copsey on 16/06/2010. | ||
// Copyright 2010 All-Seeing Interactive. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
|
||
@interface DetailCell : UITableViewCell { | ||
|
||
} | ||
+ (id)cell; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// | ||
// DetailCell.m | ||
// Part of the ASIHTTPRequest sample project - see http://allseeing-i.com/ASIHTTPRequest for details | ||
// | ||
// Created by Ben Copsey on 16/06/2010. | ||
// Copyright 2010 All-Seeing Interactive. All rights reserved. | ||
// | ||
|
||
#import "DetailCell.h" | ||
|
||
|
||
@implementation DetailCell | ||
|
||
+ (id)cell | ||
{ | ||
DetailCell *cell = [[[DetailCell alloc] initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:@"HeaderCell"] autorelease]; | ||
[[cell detailTextLabel] setTextAlignment:UITextAlignmentLeft]; | ||
[[cell detailTextLabel] setFont:[UIFont systemFontOfSize:14]]; | ||
return cell; | ||
} | ||
|
||
- (void)layoutSubviews | ||
{ | ||
[super layoutSubviews]; | ||
int tablePadding = 40; | ||
int tableWidth = [[self superview] frame].size.width; | ||
if (tableWidth > 480) { // iPad | ||
tablePadding = 110; | ||
} | ||
[[self textLabel] setFrame:CGRectMake(5,5,120,20)]; | ||
[[self detailTextLabel] setFrame:CGRectMake(135,5,[self frame].size.width-145-tablePadding,20)]; | ||
|
||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// InfoCell.h | ||
// Part of the ASIHTTPRequest sample project - see http://allseeing-i.com/ASIHTTPRequest for details | ||
// | ||
// Created by Ben Copsey on 17/06/2010. | ||
// Copyright 2010 All-Seeing Interactive. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
|
||
@interface InfoCell : UITableViewCell { | ||
|
||
} | ||
+ (id)cellWithDescription:(NSString *)description; | ||
+ (NSUInteger)neededHeightForDescription:(NSString *)description withTableWidth:(NSUInteger)tableWidth; | ||
@end |
Oops, something went wrong.