Skip to content

Commit

Permalink
design changes and bug fixes, ARC, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
cmelbye committed Mar 18, 2012
1 parent c845bc7 commit 117c112
Show file tree
Hide file tree
Showing 46 changed files with 786 additions and 12,567 deletions.
Binary file added 117-todo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 117-todo@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 19-gear.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 19-gear@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 83-calendar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 83-calendar@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10,452 changes: 0 additions & 10,452 deletions AboutView.xib

This file was deleted.

117 changes: 0 additions & 117 deletions AdMobDelegateProtocol.h

This file was deleted.

43 changes: 0 additions & 43 deletions AdMobView.h

This file was deleted.

5 changes: 2 additions & 3 deletions Classes/AboutViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
//

#import <UIKit/UIKit.h>
#import "AdMobDelegateProtocol.h"
#import "WebResourceViewController.h"

@interface AboutViewController : UIViewController <AdMobDelegate, MFMailComposeViewControllerDelegate> {
@interface AboutViewController : UITableViewController <MFMailComposeViewControllerDelegate> {

}

- (IBAction)openWebsite:(id)sender;
- (IBAction)openSupport:(id)sender;

@end
54 changes: 10 additions & 44 deletions Classes/AboutViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,67 +8,33 @@

#import <MessageUI/MessageUI.h>
#import "AboutViewController.h"
#import "AdMobView.h"

@implementation AboutViewController

/*
// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
// Custom initialization
}
return self;
}
*/

- (void)viewDidLoad {
[super viewDidLoad];


}

- (NSString *)publisherId {
return kPublisherId; // this should be prefilled; if not, get it from www.admob.com
}

- (IBAction)openWebsite:(id)sender {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://charliemelbye.com/iphone-apps/gpaide/"]];
}

- (IBAction)openSupport:(id)sender {
if ([MFMailComposeViewController canSendMail]) {
MFMailComposeViewController *mail = [[MFMailComposeViewController alloc] init];
[mail setToRecipients:[NSArray arrayWithObject:@"me@charliemelbye.com"]];
[mail setToRecipients:[NSArray arrayWithObject:@"charles.melbye@gmail.com"]];
[mail setSubject:@"GPAide Support"];
[mail setMailComposeDelegate:self];
[self presentModalViewController:mail animated:YES];
} else {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://charliemelbye.com/support/"]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://cmelbye.github.com/gpaide/support.html"]];
}
}

- (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error {
[self dismissModalViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];

// Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}


- (void)dealloc {
[super dealloc];
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"TipsAndTricksSegue"]) {
WebResourceViewController *vc = segue.destinationViewController;
vc.webAddress = @"http://cmelbye.github.com/gpaide/tips.html";
} else if ([segue.identifier isEqualToString:@"AboutSegue"]) {
WebResourceViewController *vc = segue.destinationViewController;
vc.webAddress = @"http://cmelbye.github.com/gpaide/about.html";
}
}


@end
10 changes: 5 additions & 5 deletions Classes/CoursesViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@
//

#import <UIKit/UIKit.h>
#import "AdMobDelegateProtocol.h"

@interface CoursesViewController : UITableViewController <UIPickerViewDataSource, UIPickerViewDelegate, UIActionSheetDelegate, UITextFieldDelegate, AdMobDelegate> {
@interface CoursesViewController : UITableViewController <UIPickerViewDataSource, UIPickerViewDelegate, UIActionSheetDelegate, UITextFieldDelegate> {
NSMutableDictionary *courses;
UIBarButtonItem *addButton;
NSArray *letterGradeArray;
UIAlertView *addCourseAlert;
UITextField *addCourseField;
NSInteger letterGradeSelection;
NSIndexPath *editingIndex;
AdMobView *advert;
UIActionSheet *editCourseSheet;
}

@property (nonatomic, retain) NSMutableDictionary *courses;
@property (nonatomic, retain) UIBarButtonItem *addButton;
@property (nonatomic, strong) NSMutableDictionary *courses;
@property (nonatomic, strong) UIBarButtonItem *addButton;

- (NSString *)coursesDatabasePath;
- (void)saveCourseList;
- (void)showCourseAlert;
- (void)addCourse:(NSString *)courseName;
- (void)dismissActionSheet:(id)sender;

@end
Loading

0 comments on commit 117c112

Please sign in to comment.