aboutsummaryrefslogtreecommitdiffstats
path: root/iphone/FixMyStreet/Classes/InputTableViewController.m
diff options
context:
space:
mode:
authormatthew <matthew>2008-12-24 00:08:49 +0000
committermatthew <matthew>2008-12-24 00:08:49 +0000
commit386d1ce4bbc1fd5a53b0bb22873bd8b00b6cda91 (patch)
tree4fac3ac22feced4f2fdce27dee8367754a142fa2 /iphone/FixMyStreet/Classes/InputTableViewController.m
parenta3e640c1f395bb3be15751b7686e240b2af170fa (diff)
Tweaks to text, bigger preview photo, possible bugfix
Diffstat (limited to 'iphone/FixMyStreet/Classes/InputTableViewController.m')
-rw-r--r--iphone/FixMyStreet/Classes/InputTableViewController.m25
1 files changed, 14 insertions, 11 deletions
diff --git a/iphone/FixMyStreet/Classes/InputTableViewController.m b/iphone/FixMyStreet/Classes/InputTableViewController.m
index 6d9388a83..d77439aaa 100644
--- a/iphone/FixMyStreet/Classes/InputTableViewController.m
+++ b/iphone/FixMyStreet/Classes/InputTableViewController.m
@@ -17,7 +17,7 @@
//@synthesize image;
//@synthesize imagCell;
-//@synthesize reportSummary;
+//@synthesize reportSubject;
- (id)initWithNibName:(NSString *)nibName bundle:(NSBundle *)nibBundle {
if (self = [super initWithNibName:nibName bundle:nibBundle]) {
@@ -174,7 +174,7 @@
cell.textColor = [UIColor grayColor];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
- actionSummaryCell = cell;
+ actionSubjectCell = cell;
} else if (indexPath.section == 3) {
if (delegate.name && delegate.name.length && delegate.email && delegate.email.length) {
cell.accessoryType = UITableViewCellAccessoryCheckmark;
@@ -193,11 +193,16 @@
if (indexPath.section == 0) {
[self addPhoto:nil];
} else if (indexPath.section == 2) {
- [self startLocation];
+ if ([self startLocation]) {
+ UIActivityIndicatorView* activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
+ [activityView startAnimating];
+ actionFetchLocationCell.accessoryView = activityView;
+ [activityView release];
+ }
} else if (indexPath.section == 1) {
FixMyStreetAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
EditSubjectViewController* editSubjectViewController = [[EditSubjectViewController alloc] initWithNibName:@"EditSubjectView" bundle:nil];
- [editSubjectViewController setAll:delegate.subject viewTitle:@"Edit summary" placeholder:@"Summary" keyboardType:UIKeyboardTypeDefault capitalisation:UITextAutocapitalizationTypeSentences];
+ [editSubjectViewController setAll:delegate.subject viewTitle:@"Edit subject" placeholder:@"Subject" keyboardType:UIKeyboardTypeDefault capitalisation:UITextAutocapitalizationTypeSentences];
[self.navigationController pushViewController:editSubjectViewController animated:YES];
[editSubjectViewController release];
} else if (indexPath.section == 3) {
@@ -247,7 +252,7 @@
[imageView release];
[actionTakePhotoCell release];
[actionFetchLocationCell release];
- [actionSummaryCell release];
+ [actionSubjectCell release];
[actionsToDoView release];
[settingsButton release];
[backButton release];
@@ -277,18 +282,16 @@
// MyCLControllerDelegate and related
--(void)startLocation {
+-(BOOL)startLocation {
NetworkStatus internetConnectionStatus = [[Reachability sharedReachability] internetConnectionStatus];
if (internetConnectionStatus == NotReachable) {
UIAlertView *v = [[UIAlertView alloc] initWithTitle:@"Location required" message:@"FixMyStreet needs some sort of connection in order to find your location." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[v show];
- [v release];
+ [v release];
+ return FALSE;
} else {
[[MyCLController sharedInstance] startUpdatingLocation];
- UIActivityIndicatorView* activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
- [activityView startAnimating];
- actionFetchLocationCell.accessoryView = activityView;
- [activityView release];
+ return TRUE;
}
}