Created
November 21, 2012 19:19
-
-
Save casspangell/4127029 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@protocol PopUp2Delegate <NSObject> | |
-(void)displayPopUp2; | |
-(void)displayTutorialPopUp; | |
@end | |
@protocol AddressCreateDelegate <NSObject> | |
-(void)addressSubmitted:(NSDictionary *)address; | |
-(void)displayTutorialPopUp; | |
@end | |
@protocol AddressLostNetworkDelegate<NSObject> | |
-(void) lostConnection:(NSNotification *)notice; | |
@end | |
@property (assign, nonatomic) id <PopUp2Delegate>popDelegate; | |
-(id)initWithPopDelegate:(id<PopUp2Delegate>)popDel; | |
@property (assign, nonatomic) id <AddressLostNetworkDelegate>noNetworkDelegate; | |
@property (assign, nonatomic) id <AddressCreateDelegate>paymentDelegate; | |
-(id)initWithDelegate:(id<AddressCreateDelegate>)payDel; | |
-(id)initWithDict:(NSDictionary *)dict andDelegate:(id<AddressCreateDelegate>)addyDel; |
This file contains hidden or 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
@implementation AddressViewController | |
@synthesize paymentDelegate, popDelegate; | |
-(id)initWithDelegate:(id<AddressCreateDelegate>)payDel{ | |
self = [super init]; | |
if(self){ | |
self.paymentDelegate = payDel; | |
self.shouldShowWithNoService = YES; | |
} | |
return self; | |
} | |
-(id)initWithPopDelegate:(id<PopUp2Delegate>)popDel { | |
self = [super init]; | |
if(self){ | |
self.popDelegate = popDel; | |
} | |
return self; | |
} |
This file contains hidden or 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
#import "AudioRecorderDelegate.h" | |
#import "CustomProgressView.h" | |
#import "DialogDelegate.h" | |
#import "TutorialDialogDelegate.h" | |
#import "FirstLaunchDialogDelegate.h" | |
#import "SignUpViewController.h" | |
#import "AddressViewController.h" | |
#import "PopUp1ViewController.h" | |
#import "PopUp2ViewController.h" | |
#import "TutorialScreenViewController.h" | |
#import "SettingsViewController.h" | |
@interface ListenViewController : UIViewController <CLLocationManagerDelegate, AudioRecorderDelegate, DialogDelegate, FirstLaunchDialogDelegate, UIAlertViewDelegate, PopUp1Delegate, PopUp2Delegate, SignInDelegate, DisplayAddressDelegate, AddressCreateDelegate, AddressLostNetworkDelegate, DisplayTutorialDelegate, SettingsDelegate> | |
{ | |
BOOL doesHaveLocationServicesAuthorized; | |
} |
This file contains hidden or 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
- (IBAction)launchTutorial:(id)sender { | |
SignUpViewController *viewController = [[SignUpViewController alloc] initWithDelegate:self]; | |
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController]; | |
navController.navigationBarHidden = YES; | |
[self.navigationController presentModalViewController:navController animated:YES]; | |
[viewController release]; | |
[navController release]; | |
} | |
-(void)displayPopUp1 { | |
[self.navigationController dismissViewControllerAnimated:NO completion:^{ | |
PopUp1ViewController *vc = [[PopUp1ViewController alloc] initWithSignDelegate:(id)self]; //added the cast (id) to stop a warning | |
[self.navigationController pushViewController:vc animated:NO]; | |
}]; | |
} | |
-(void)displayPopUp2 { | |
[self.navigationController dismissViewControllerAnimated:NO completion:^{ | |
PopUp2ViewController *vc = [[PopUp2ViewController alloc] initWithAddressDelegate:self]; | |
[self.navigationController pushViewController:vc animated:NO]; | |
}]; | |
} | |
-(void)displayAddAddressPopUp { | |
[self.navigationController dismissViewControllerAnimated:NO completion:^{ | |
AddressViewController *vc = [[AddressViewController alloc] initWithPopDelegate:self]; | |
[self.navigationController pushViewController:vc animated:NO]; | |
}]; | |
} | |
-(void)displayTutorialPopUp { | |
[self.navigationController dismissViewControllerAnimated:NO completion:^{ | |
TutorialScreenViewController *vc = [[TutorialScreenViewController alloc] initWithTutorialDelegate:self]; | |
[self.navigationController pushViewController:vc animated:NO]; | |
}]; | |
} | |
-(void)displaySignUpScreen { | |
[self.navigationController dismissViewControllerAnimated:NO completion:^{ | |
SignUpViewController *vc = [[SignUpViewController alloc] initWithPopDelegate:self]; | |
[self.navigationController pushViewController:vc animated:NO]; | |
}]; | |
} | |
-(void)displayAddressFromPopUp1 { | |
[self.navigationController dismissViewControllerAnimated:NO completion:^{ | |
AddressViewController *vc = [[AddressViewController alloc] initWithDelegate:self]; | |
[self.navigationController pushViewController:vc animated:NO]; | |
}]; | |
} |
This file contains hidden or 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
@protocol PopUp1Delegate <NSObject> | |
-(void)displayPopUp1; | |
-(void)displayAddAddressPopUp; | |
-(void)displayTutorialPopUp; | |
@end | |
@property (assign, nonatomic) id <SignInDelegate> delegate; | |
@property (assign, nonatomic) id <PopUp1Delegate> popDelegate; | |
-(id)initWithPopDelegate:(id<PopUp1Delegate>)popDel; |
This file contains hidden or 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
#import "AddressViewController.h" | |
@protocol DisplayTutorialDelegate <NSObject> | |
-(void)displayTutorialPopUp; | |
@end | |
@interface TutorialScreenViewController : UIViewController <PopUp2Delegate> | |
@property(nonatomic, retain) IBOutlet UIButton *privacyButton; | |
@property(nonatomic, retain) IBOutlet UIButton *emailButton; | |
@property (nonatomic, retain) id <DisplayTutorialDelegate>tutDelegate; | |
-(id)initWithTutorialDelegate:(id<DisplayTutorialDelegate>)tutDel; |
This file contains hidden or 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
-(id)initWithTutorialDelegate:(id<DisplayTutorialDelegate>)tutDel{ | |
self = [super init]; | |
if(self){ | |
self.tutDelegate = tutDel; | |
} | |
return self; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment