+ Adapted Add Photo Layout to iOS6 style.

This commit is contained in:
moritz haarmann 2014-04-11 15:01:24 +02:00
parent 96c60ec394
commit 6151ed6ac7

View File

@ -183,10 +183,10 @@
// Add Photo Button + Container that's displayed above the keyboard. // Add Photo Button + Container that's displayed above the keyboard.
self.textAccessoryView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.frame), 44)]; self.textAccessoryView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.frame), 44)];
self.textAccessoryView.backgroundColor = [UIColor colorWithRed:0.9f green:0.9f blue:0.9f alpha:1.0f]; self.textAccessoryView.backgroundColor = [UIColor colorWithRed:0.9f green:0.9f blue:0.9f alpha:1.0f];
UIButton *addPhotoButton = [UIButton buttonWithType:UIButtonTypeSystem]; UIButton *addPhotoButton = [UIButton buttonWithType:UIButtonTypeCustom];
[addPhotoButton setTitle:@"+ Add Photo" forState:UIControlStateNormal]; [addPhotoButton setTitle:@"+ Add Photo" forState:UIControlStateNormal];
addPhotoButton.frame = CGRectMake(0, 0, 100, 44); [addPhotoButton setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];
addPhotoButton.frame = CGRectMake(0, 0, CGRectGetWidth(self.view.frame), 44);
[addPhotoButton addTarget:self action:@selector(addPhotoAction:) forControlEvents:UIControlEventTouchUpInside]; [addPhotoButton addTarget:self action:@selector(addPhotoAction:) forControlEvents:UIControlEventTouchUpInside];
[self.textAccessoryView addSubview:addPhotoButton]; [self.textAccessoryView addSubview:addPhotoButton];