delegate_ = delegate;
}
+- (void) setHook:(id)hook {
+ hook_ = hook;
+}
+
- (void) setPage:(RVPage *)page {
if ([pages_ count] != 0)
[[pages_ lastObject] setPageActive:NO];
}
- (void) reloadData {
- for (int i(0), e([pages_ count]); i != e; ++i) {
- RVPage *page([pages_ objectAtIndex:(e - i - 1)]);
+ size_t count([pages_ count]);
+ for (size_t i(0); i != count; ++i) {
+ RVPage *page([pages_ objectAtIndex:(count - i - 1)]);
[page reloadData];
}
+
+ if (count != 0) {
+ RVPage *page([pages_ lastObject]);
+ [self reloadButtonsForPage:page];
+ }
}
- (CGRect) pageBounds {
}
- (void) close {
+ if (hook_ != nil)
+ [hook_ didCloseBook:self];
}
@end
- (void) close {
[self popFromSuperviewAnimated:YES];
+ [super close];
}
@end