Skip to content

Commit

Permalink
add reset facility.
Browse files Browse the repository at this point in the history
  • Loading branch information
mootoh committed Jun 15, 2009
1 parent b8999d0 commit 68df1f8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Classes/DragonRador.h
Expand Up @@ -4,4 +4,4 @@
#define DR_TWITTER_PASSWORD @"password"

//#define LOCATION_SERVER @"http://dragon-rador.appspot.com"
#define LOCATION_SERVER @"http://192.168.1.101:8080"
#define LOCATION_SERVER @"http://192.168.1.100:8080"
2 changes: 2 additions & 0 deletions Classes/FriendsPickViewController.m
Expand Up @@ -144,6 +144,8 @@ - (void)viewDidLoad
selected_friends = saved_friends ? [NSMutableArray arrayWithArray:saved_friends] : [NSMutableArray array];
[selected_friends retain];

NSLog(@"saved friends are %@", saved_friends);

TwitterFriends *tf = [[TwitterFriends alloc] init:[[NSUserDefaults standardUserDefaults] stringForKey:DR_TWITTER_USER]];
friends = [[tf retrieveFriends] retain];
[tf release];
Expand Down
8 changes: 7 additions & 1 deletion Classes/SettingViewController.m
Expand Up @@ -134,14 +134,20 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
break;
}
} else if (indexPath.section == 1) {
cell.textLabel.text = @"Followers...";
cell.textLabel.text = @"Reset";
}

return cell;
}


- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 1) {
[[NSUserDefaults standardUserDefaults] removeObjectForKey:DR_MY_LOCATION];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:DR_FRIENDS];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:DR_TWITTER_USER];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:DR_TWITTER_PASSWORD];
}
// Navigation logic may go here. Create and push another view controller.
// AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil];
// [self.navigationController pushViewController:anotherViewController];
Expand Down

0 comments on commit 68df1f8

Please sign in to comment.