aboutsummaryrefslogtreecommitdiffstats
path: root/iphone/FixMyStreet/Classes/InputTableViewController.m
diff options
context:
space:
mode:
authormatthew <matthew>2008-10-28 12:30:00 +0000
committermatthew <matthew>2008-10-28 12:30:00 +0000
commit5d920990eaca496eed1d48619b71661253cc270f (patch)
tree0fb6684314c412282617b82f9002b0caf7a45cf1 /iphone/FixMyStreet/Classes/InputTableViewController.m
parent6cada1ab374273233822f7fffbd5da3cfb656840 (diff)
Store lat/lon strings as I know storing/restoring works for them, and that's all I need anyway.
Diffstat (limited to 'iphone/FixMyStreet/Classes/InputTableViewController.m')
-rw-r--r--iphone/FixMyStreet/Classes/InputTableViewController.m16
1 files changed, 12 insertions, 4 deletions
diff --git a/iphone/FixMyStreet/Classes/InputTableViewController.m b/iphone/FixMyStreet/Classes/InputTableViewController.m
index 6515e3e75..91c7ec5e9 100644
--- a/iphone/FixMyStreet/Classes/InputTableViewController.m
+++ b/iphone/FixMyStreet/Classes/InputTableViewController.m
@@ -53,6 +53,12 @@
// Let's start trying to find our location...
[MyCLController sharedInstance].delegate = self;
[[MyCLController sharedInstance] startUpdatingLocation];
+
+ FixMyStreetAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
+ if (delegate.image) {
+ imageView.image = delegate.image;
+ }
+
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
@@ -66,7 +72,7 @@
-(void)enableSubmissionButton {
[actionsToDoView reloadData];
FixMyStreetAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
- if (delegate.image && delegate.location && delegate.subject && delegate.subject.length) {
+ if (delegate.image && delegate.latitude && delegate.subject && delegate.subject.length) {
self.navigationItem.rightBarButtonItem.enabled = YES;
} else {
self.navigationItem.rightBarButtonItem.enabled = NO;
@@ -124,7 +130,7 @@
cell.text = @"Take photo";
actionTakePhotoCell = cell;
} else if (indexPath.section == 2) {
- if (delegate.location) {
+ if (delegate.latitude) {
cell.accessoryView = nil;
cell.accessoryType = UITableViewCellAccessoryCheckmark;
} else if ([MyCLController sharedInstance].updating) {
@@ -270,8 +276,10 @@
//[alert release];
FixMyStreetAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
- delegate.location = location;
-
+// delegate.location = location;
+ delegate.latitude = [NSString stringWithFormat:@"%f", location.coordinate.latitude];
+ delegate.longitude = [NSString stringWithFormat:@"%f", location.coordinate.longitude];
+
[self enableSubmissionButton];
}