summaryrefslogtreecommitdiff
path: root/UICaboodle/RVBook.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2008-12-28 10:03:16 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2010-09-30 07:09:26 +0000
commit00e2109e804e55567a7682c902047d532da63033 (patch)
tree731e736da9d85ab448b2640303bffde04dff07bb /UICaboodle/RVBook.mm
parentaa5d0de7a71977eaf42728cfe4ab8ae31d1133a9 (diff)
Fixed some last minute isues.
Diffstat (limited to 'UICaboodle/RVBook.mm')
-rw-r--r--UICaboodle/RVBook.mm21
1 files changed, 14 insertions, 7 deletions
diff --git a/UICaboodle/RVBook.mm b/UICaboodle/RVBook.mm
index b1bbce6..b639958 100644
--- a/UICaboodle/RVBook.mm
+++ b/UICaboodle/RVBook.mm
@@ -220,15 +220,19 @@
[navitem setTitle:title];
}
-- (NSString *) _leftButtonTitleForPage:(RVPage *)page {
- return [page leftButtonTitle];
+- (void) _leftButtonTitle:(NSString *&)leftButtonTitle style:(UINavigationButtonStyle &)leftButtonStyle forPage:(RVPage *)page {
+ leftButtonTitle = [page leftButtonTitle];
+ leftButtonStyle = [page leftButtonStyle];
}
- (void) reloadButtonsForPage:(RVPage *)page {
if ([pages_ count] == 0 || page != [pages_ lastObject])
return;
- NSString *leftButtonTitle([self _leftButtonTitleForPage:page]);
- UINavigationButtonStyle leftButtonStyle = [page leftButtonStyle];
+
+ NSString *leftButtonTitle;
+ UINavigationButtonStyle leftButtonStyle;
+ [self _leftButtonTitle:leftButtonTitle style:leftButtonStyle forPage:page];
+
UINavigationButtonStyle rightButtonStyle = [page rightButtonStyle];
//[navbar_ showButtonsWithLeftTitle:leftButtonTitle rightTitle:[page rightButtonTitle] leftBack:(leftButtonTitle == nil)];
@@ -262,9 +266,12 @@
@implementation RVPopUpBook
-- (NSString *) _leftButtonTitleForPage:(RVPage *)page {
- NSString *title([super _leftButtonTitleForPage:page]);
- return (cancel_ = title == nil && [pages_ count] == 1) ? @"Cancel" : title;
+- (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";
+ leftButtonStyle = UINavigationButtonStyleNormal;
+ }
}
- (void) navigationBar:(UINavigationBar *)navbar buttonClicked:(int)button {