X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/2a987aa59627d5c7ddbaa85645bbbca3e432b4c6..87c76914b78e2ef0aeb16ce28e38c90ed736f0f9:/UICaboodle/RVBook.mm diff --git a/UICaboodle/RVBook.mm b/UICaboodle/RVBook.mm index e6cc1263..9315cae9 100644 --- a/UICaboodle/RVBook.mm +++ b/UICaboodle/RVBook.mm @@ -8,6 +8,14 @@ #import #import +#import +#import + +#include +#include + +#include + #import "RVPage.h" @implementation RVBook @@ -102,11 +110,7 @@ [pages_ addObject:page]; [self reloadButtonsForPage:page]; -#ifdef __OBJC2__ [navbar_ setAccessoryView:[page accessoryView] animate:animated removeOnPop:NO]; -#else - [navbar_ setAccessoryView:[page accessoryView] animate:animated goingBack:NO]; -#endif } - (void) popPages:(unsigned)pages { @@ -149,11 +153,8 @@ [transition_ transition:(animated ? 2 : 0) toView:page]; [page setPageActive:YES]; [self reloadButtonsForPage:page]; -#ifdef __OBJC2__ + [navbar_ setAccessoryView:[page accessoryView] animate:animated removeOnPop:NO]; -#else - [navbar_ setAccessoryView:[page accessoryView] animate:animated goingBack:YES]; -#endif } - (void) setTitle:(NSString *)title forPage:(RVPage *)page { @@ -173,8 +174,17 @@ - (void) reloadButtonsForPage:(RVPage *)page { if ([pages_ count] == 0 || page != [pages_ lastObject]) return; - NSString *leftButtonTitle([pages_ count] == 1 ? [page leftButtonTitle] : nil); - [navbar_ showButtonsWithLeftTitle:leftButtonTitle rightTitle:[page rightButtonTitle]]; + NSString *leftButtonTitle([page leftButtonTitle]); + RVUINavBarButtonStyle leftButtonStyle = [page leftButtonStyle]; + RVUINavBarButtonStyle rightButtonStyle = [page rightButtonStyle]; + //[navbar_ showButtonsWithLeftTitle:leftButtonTitle rightTitle:[page rightButtonTitle] leftBack:(leftButtonTitle == nil)]; + + [navbar_ + showLeftButton:leftButtonTitle + withStyle:leftButtonStyle + rightButton:[page rightButtonTitle] + withStyle:rightButtonStyle + ]; } - (NSString *) getTitleForPage:(RVPage *)page {