]> git.saurik.com Git - cydia.git/blobdiff - UICaboodle/RVBook.mm
20 minutes of typing.
[cydia.git] / UICaboodle / RVBook.mm
index 29e9513bf2ce9ab2e804476374a47d633f61163a..433de39dedd55dcd4f476d74483d977c71021323 100644 (file)
     [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];
 }