-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
72 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#import <UIKit/UIKit.h> | ||
|
||
|
||
extern NSString * const OAVCMessageLoading; | ||
extern NSString * const OAVCMessageFetchAccess; | ||
extern NSString * const OAVCMessageFetchRequest; | ||
|
||
|
||
@class BaseOAuthViewController; | ||
|
||
@protocol OAuthVCActivityDelegate <NSObject> | ||
-(void)oAuthViewController:(BaseOAuthViewController *)viewController becomeActiveWithMessage:(NSString *)message; | ||
-(void)oAuthViewControllerDoneActivity:(BaseOAuthViewController *)viewController; | ||
-(void)oAuthViewControllerDismissed:(BaseOAuthViewController *)viewController; | ||
-(void)oAuthViewControllerDidCancel:(BaseOAuthViewController *)viewController; | ||
@end | ||
|
||
@interface BaseOAuthViewController : UIViewController{ | ||
@protected NSNotificationCenter *_notificationCenter; | ||
@protected __weak id <OAuthVCActivityDelegate> _activityDelegate; | ||
} | ||
|
||
@property(weak,nonatomic) id <OAuthVCActivityDelegate> activityDelegate; | ||
|
||
@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,47 @@ | ||
#import "BaseOAuthViewController.h" | ||
|
||
NSString * const OAVCMessageLoading = @"Loading..."; | ||
NSString * const OAVCMessageFetchAccess = @"Fetch access token..."; | ||
NSString * const OAVCMessageFetchRequest = @"Fetch request token..."; | ||
|
||
@interface BaseOAuthViewController () | ||
|
||
@end | ||
|
||
@implementation BaseOAuthViewController | ||
@synthesize activityDelegate = _activityDelegate; | ||
|
||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil | ||
{ | ||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; | ||
if (self) { | ||
_notificationCenter = [NSNotificationCenter defaultCenter]; | ||
// Custom initialization | ||
} | ||
return self; | ||
} | ||
|
||
- (void)viewDidLoad | ||
{ | ||
[super viewDidLoad]; | ||
// Do any additional setup after loading the view. | ||
} | ||
|
||
- (void)didReceiveMemoryWarning | ||
{ | ||
[super didReceiveMemoryWarning]; | ||
// Dispose of any resources that can be recreated. | ||
} | ||
|
||
/* | ||
#pragma mark - Navigation | ||
// In a storyboard-based application, you will often want to do a little preparation before navigation | ||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender | ||
{ | ||
// Get the new view controller using [segue destinationViewController]. | ||
// Pass the selected object to the new view controller. | ||
} | ||
*/ | ||
|
||
@end |