diff --git a/TTAlertView/TTAlertView.m b/TTAlertView/TTAlertView.m index 37773f6..90664d5 100644 --- a/TTAlertView/TTAlertView.m +++ b/TTAlertView/TTAlertView.m @@ -269,6 +269,7 @@ - (void)addButtonWithTitle:(NSString *)title [otherButton addTarget:self action:@selector(otherButtonAction:) forControlEvents:UIControlEventTouchUpInside]; [otherButton setTitle:title forState:UIControlStateNormal]; [self.containerView addSubview:otherButton]; + if (self.firstOtherButtonIndex < 0) _firstOtherButtonIndex = MAX(_cancelButtonIndex, 0) + 1; [self.buttons insertObject:otherButton atIndex:([self.buttons count] - 1) + self.firstOtherButtonIndex]; if(self.isVisible) {