[pages_ addObject:page];
[self reloadButtonsForPage:page];
- [navbar_ setAccessoryView:[page accessoryView] animate:animated removeOnPop:NO];
+ if ([navbar_ respondsToSelector:@selector(setAccessoryView:animate:removeOnPop:)])
+ [navbar_ setAccessoryView:[page accessoryView] animate:animated removeOnPop:NO];
+ else
+ [navbar_ setAccessoryView:[page accessoryView] animate:animated];
}
- (void) pushPage:(RVPage *)page {
[page setPageActive:YES];
[self reloadButtonsForPage:page];
- [navbar_ setAccessoryView:[page accessoryView] animate:animated removeOnPop:NO];
+ if ([navbar_ respondsToSelector:@selector(setAccessoryView:animate:removeOnPop:)])
+ [navbar_ setAccessoryView:[page accessoryView] animate:animated removeOnPop:NO];
+ else
+ [navbar_ setAccessoryView:[page accessoryView] animate:animated];
}
- (void) setBackButtonTitle:(NSString *)title forPage:(RVPage *)page {
}
}
+- (void) reloadButtons {
+ size_t count([pages_ count]);
+ if (count != 0) {
+ RVPage *page([pages_ lastObject]);
+ [self reloadButtonsForPage:page];
+ }
+}
+
- (CGRect) pageBounds {
return [transition_ bounds];
}
- (void) _leftButtonTitle:(NSString *&)leftButtonTitle style:(UINavigationButtonStyle &)leftButtonStyle forPage:(RVPage *)page {
[super _leftButtonTitle:leftButtonTitle style:leftButtonStyle forPage:page];
if ((cancel_ = leftButtonTitle == nil && [pages_ count] == 1)) {
- leftButtonTitle = @"Cancel";
+ leftButtonTitle = [[NSBundle mainBundle] localizedStringForKey:@"CANCEL" value:nil table:nil];
leftButtonStyle = UINavigationButtonStyleNormal;
}
}