Skip to content

Commit

Permalink
read setting for username and added debug flag for devlog
Browse files Browse the repository at this point in the history
  • Loading branch information
sschroed committed Jan 16, 2009
1 parent 027b555 commit fa3d4a0
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 6 deletions.
2 changes: 2 additions & 0 deletions Classes/RootViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#import <UIKit/UIKit.h>

@interface RootViewController : UITableViewController {

NSString *gitHubUserName;
}

@end
18 changes: 13 additions & 5 deletions Classes/RootViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,22 @@

@implementation RootViewController

/*
- (void) loadPrefs {
// read user prefs
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
gitHubUserName = [defaults stringForKey:@"GitHubUserName"];
}

- (void)viewDidLoad {
[super viewDidLoad];
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
[self loadPrefs];

DevLog2(@"username: %@", gitHubUserName);

// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
}
*/


/*
- (void)viewWillAppear:(BOOL)animated {
Expand Down Expand Up @@ -131,8 +139,8 @@ - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)
}
*/


- (void)dealloc {
[gitHubUserName release];
[super dealloc];
}

Expand Down
6 changes: 5 additions & 1 deletion git-phone.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,12 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = (
"-D",
__DEBUG__,
);
PREBINDING = NO;
SDKROOT = iphoneos2.2;
SDKROOT = iphonesimulator2.2;
};
name = Debug;
};
Expand Down
14 changes: 14 additions & 0 deletions git_phone_Prefix.pch
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,17 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#endif

// -----------------------------------------------------------------------------
#pragma mark -
#pragma mark Development Logging

#ifdef __DEBUG__
#define DevLog(a) NSLog(a)
#define DevLog2(a, b) NSLog(a, b)
#define DevLog3(a, b, c) NSLog(a, b, c)
#else
#define DevLog(a)
#define DevLog2(a, b)
#define DevLog3(a, b, c)
#endif

0 comments on commit fa3d4a0

Please sign in to comment.