aboutsummaryrefslogtreecommitdiffstats
path: root/iphone/FixMyStreet/Classes/EditSubjectViewController.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/EditSubjectViewController.m
parenta3e640c1f395bb3be15751b7686e240b2af170fa (diff)
Tweaks to text, bigger preview photo, possible bugfix
Diffstat (limited to 'iphone/FixMyStreet/Classes/EditSubjectViewController.m')
-rw-r--r--iphone/FixMyStreet/Classes/EditSubjectViewController.m31
1 files changed, 28 insertions, 3 deletions
diff --git a/iphone/FixMyStreet/Classes/EditSubjectViewController.m b/iphone/FixMyStreet/Classes/EditSubjectViewController.m
index 3abece54e..614aa7f7b 100644
--- a/iphone/FixMyStreet/Classes/EditSubjectViewController.m
+++ b/iphone/FixMyStreet/Classes/EditSubjectViewController.m
@@ -45,6 +45,9 @@
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+ if (cell.textField.placeholder == @"Subject") {
+ return 2;
+ }
return 1;
}
@@ -53,9 +56,31 @@
return 1;
}
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+ if (indexPath.section == 1) {
+ return 54.0;
+ }
+ return 44.0;
+}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- return cell;
+ if (indexPath.section == 1) {
+ static NSString *CellIdentifier = @"InfoCell";
+ UITableViewCell *infoCell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+ if (infoCell == nil) {
+ infoCell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
+ UITextView *blurb = [[UITextView alloc] initWithFrame:CGRectMake(10, 0, 280, 44)];
+ blurb.font = [UIFont italicSystemFontOfSize:14];
+ blurb.textAlignment = UITextAlignmentCenter;
+ blurb.editable = NO;
+ blurb.text = @"You can provide more details\nlater on at the website";
+ [infoCell.contentView addSubview:blurb];
+ [blurb release];
+ }
+ return infoCell;
+ }
+
+ return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
@@ -99,7 +124,7 @@
FixMyStreetAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
// This is yucky, but I can't think of a better way that wouldn't just waste time.
NSString* placeholder = cell.textField.placeholder;
- if (placeholder == @"Summary") {
+ if (placeholder == @"Subject") {
if (text.length) {
delegate.subject = text;
} else {
@@ -128,7 +153,7 @@
}
-(BOOL)textFieldShouldReturn:(UITextField*)theTextField {
- //if (theTextField == summaryTextField) {
+ //if (theTextField == subjectTextField) {
[theTextField resignFirstResponder];
[self updateText:theTextField.text];
//}