pull/1/head
Frederic Jacobs 10 years ago
parent 099bea05ba
commit 9bf5518f6f

@ -95,7 +95,7 @@
[fullLabelString addAttribute:NSForegroundColorAttributeName value:[UIColor ows_darkGrayColor] range:NSMakeRange(firstLine.length + 1, secondLine.length)]; [fullLabelString addAttribute:NSForegroundColorAttributeName value:[UIColor ows_darkGrayColor] range:NSMakeRange(firstLine.length + 1, secondLine.length)];
label.attributedText = fullLabelString; label.attributedText = fullLabelString;
//250, 66, 140 //250, 66, 140
[label setFrame:CGRectMake(self.tableView.frame.size.width/2.0f-250/2.0f, 100+140, 250, 66)]; [label setFrame:CGRectMake([self marginSize], 100+140, [self contentWidth], 66)];
return label; return label;
} }
@ -141,7 +141,7 @@
UIButton *inviteContactButton = [self createButtonWithTitle:NSLocalizedString(@"EMPTY_CONTACTS_INVITE_BUTTON", @"")]; UIButton *inviteContactButton = [self createButtonWithTitle:NSLocalizedString(@"EMPTY_CONTACTS_INVITE_BUTTON", @"")];
[inviteContactButton addTarget:self action:@selector(sendText) forControlEvents:UIControlEventTouchUpInside]; [inviteContactButton addTarget:self action:@selector(sendText) forControlEvents:UIControlEventTouchUpInside];
[inviteContactButton setFrame:CGRectMake(self.tableView.frame.size.width/2.0f-inviteContactButton.frame.size.width/1.5f, self.tableView.frame.size.height - 200, 100, 66)]; [inviteContactButton setFrame:CGRectMake([self marginSize], self.tableView.frame.size.height - 200, [self contentWidth],60)];
[inviteContactButton.titleLabel setTextAlignment:NSTextAlignmentCenter]; [inviteContactButton.titleLabel setTextAlignment:NSTextAlignmentCenter];
[_emptyBackgroundView addSubview:emptyImageView]; [_emptyBackgroundView addSubview:emptyImageView];
@ -298,7 +298,8 @@
confirmMessage = [confirmMessage stringByAppendingString:currentSearchTerm]; confirmMessage = [confirmMessage stringByAppendingString:currentSearchTerm];
confirmMessage = [confirmMessage stringByAppendingString:NSLocalizedString(@"QUESTIONMARK_PUNCTUATION", @"")]; confirmMessage = [confirmMessage stringByAppendingString:NSLocalizedString(@"QUESTIONMARK_PUNCTUATION", @"")];
} }
UIAlertController *alertController = [UIAlertController
__block UIAlertController *alertController = [UIAlertController
alertControllerWithTitle:NSLocalizedString(@"CONFIRMATION_TITLE", @"") alertControllerWithTitle:NSLocalizedString(@"CONFIRMATION_TITLE", @"")
message:confirmMessage message:confirmMessage
preferredStyle:UIAlertControllerStyleAlert]; preferredStyle:UIAlertControllerStyleAlert];
@ -337,9 +338,7 @@
sendTextButton.hidden = YES; sendTextButton.hidden = YES;
self.searchController.searchBar.text = @""; self.searchController.searchBar.text = @"";
[self.parentViewController dismissViewControllerAnimated:NO completion:^{
[self presentViewController:alertController animated:YES completion:[UIUtil modalCompletionBlock]]; [self presentViewController:alertController animated:YES completion:[UIUtil modalCompletionBlock]];
}];
} }
#pragma mark - SMS Composer Delegate #pragma mark - SMS Composer Delegate
@ -486,9 +485,17 @@
self.searchController.active = NO; self.searchController.active = NO;
} }
-(IBAction)closeAction:(id)sender - (IBAction)closeAction:(id)sender
{ {
[self dismissViewControllerAnimated:YES completion:nil]; [self dismissViewControllerAnimated:YES completion:nil];
} }
- (CGFloat)contentWidth {
return [UIScreen mainScreen].bounds.size.width - 2*[self marginSize];
}
- (CGFloat)marginSize {
return 20;
}
@end @end

Loading…
Cancel
Save