summaryrefslogtreecommitdiff
path: root/UICaboodle
diff options
context:
space:
mode:
Diffstat (limited to 'UICaboodle')
-rw-r--r--UICaboodle/BrowserView.h6
-rw-r--r--UICaboodle/RVBook.h4
-rw-r--r--UICaboodle/RVBook.mm18
-rw-r--r--UICaboodle/RVPage.h13
-rw-r--r--UICaboodle/RVPage.mm10
-rw-r--r--UICaboodle/ResetView.h3
6 files changed, 24 insertions, 30 deletions
diff --git a/UICaboodle/BrowserView.h b/UICaboodle/BrowserView.h
index caafaa5..7a227d0 100644
--- a/UICaboodle/BrowserView.h
+++ b/UICaboodle/BrowserView.h
@@ -7,18 +7,20 @@
@class UIProgressIndicator;
@class UIScroller;
-@class UIWebView;
+@class UIDocumentWebView;
@class WebView;
@class Database;
+@class IndirectDelegate;
@interface BrowserView : RVPage {
_transient Database *database_;
UIScroller *scroller_;
- UIWebView *webview_;
+ UIWebDocumentView *webview_;
NSMutableArray *urls_;
UIProgressIndicator *indicator_;
+ IndirectDelegate *indirect_;
NSString *title_;
bool loading_;
diff --git a/UICaboodle/RVBook.h b/UICaboodle/RVBook.h
index 43078fc..8b05185 100644
--- a/UICaboodle/RVBook.h
+++ b/UICaboodle/RVBook.h
@@ -21,6 +21,8 @@
_transient id delegate_;
}
+- (UINavigationBar *) navigationBar;
+
- (id) initWithFrame:(CGRect)frame;
- (void) setDelegate:(id)delegate;
@@ -29,8 +31,6 @@
- (void) pushPage:(RVPage *)page;
- (void) popPages:(unsigned)pages;
-- (void) setPrompt:(NSString *)prompt;
-
- (void) resetViewAnimated:(BOOL)animated;
- (void) resetViewAnimated:(BOOL)animated toPage:(RVPage *)page;
diff --git a/UICaboodle/RVBook.mm b/UICaboodle/RVBook.mm
index 9315cae..cef1ace 100644
--- a/UICaboodle/RVBook.mm
+++ b/UICaboodle/RVBook.mm
@@ -29,6 +29,10 @@
[super dealloc];
}
+- (UINavigationBar *) navigationBar {
+ return navbar_;
+}
+
- (void) navigationBar:(UINavigationBar *)navbar buttonClicked:(int)button {
_assert([pages_ count] != 0);
RVPage *page = [pages_ lastObject];
@@ -52,7 +56,7 @@
pages_ = [[NSMutableArray arrayWithCapacity:4] retain];
struct CGRect bounds = [self bounds];
- CGSize navsize = [UINavigationBar defaultSizeWithPrompt];
+ CGSize navsize = [UINavigationBar defaultSize];
CGRect navrect = {{0, 0}, navsize};
navbar_ = [[UINavigationBar alloc] initWithFrame:navrect];
@@ -61,8 +65,6 @@
[navbar_ setBarStyle:0];
[navbar_ setDelegate:self];
- [navbar_ setPrompt:@""];
-
transition_ = [[UITransitionView alloc] initWithFrame:CGRectMake(
bounds.origin.x, bounds.origin.y + navsize.height, bounds.size.width, bounds.size.height - navsize.height
)];
@@ -104,6 +106,7 @@
[navbar_ pushNavigationItem:navitem];
BOOL animated = [pages_ count] == 0 ? NO : YES;
+ [page setFrame:[transition_ bounds]];
[transition_ transition:(animated ? 1 : 0) toView:page];
[page setPageActive:YES];
@@ -127,10 +130,6 @@
[self resetViewAnimated:YES toPage:[pages_ lastObject]];
}
-- (void) setPrompt:(NSString *)prompt {
- [navbar_ setPrompt:prompt];
-}
-
- (void) resetViewAnimated:(BOOL)animated {
resetting_ = true;
@@ -150,6 +149,7 @@
- (void) resetViewAnimated:(BOOL)animated toPage:(RVPage *)page {
[page resetViewAnimated:animated];
+ [page setFrame:[transition_ bounds]];
[transition_ transition:(animated ? 2 : 0) toView:page];
[page setPageActive:YES];
[self reloadButtonsForPage:page];
@@ -175,8 +175,8 @@
if ([pages_ count] == 0 || page != [pages_ lastObject])
return;
NSString *leftButtonTitle([page leftButtonTitle]);
- RVUINavBarButtonStyle leftButtonStyle = [page leftButtonStyle];
- RVUINavBarButtonStyle rightButtonStyle = [page rightButtonStyle];
+ UINavigationButtonStyle leftButtonStyle = [page leftButtonStyle];
+ UINavigationButtonStyle rightButtonStyle = [page rightButtonStyle];
//[navbar_ showButtonsWithLeftTitle:leftButtonTitle rightTitle:[page rightButtonTitle] leftBack:(leftButtonTitle == nil)];
[navbar_
diff --git a/UICaboodle/RVPage.h b/UICaboodle/RVPage.h
index 8b0a2e4..67b73d6 100644
--- a/UICaboodle/RVPage.h
+++ b/UICaboodle/RVPage.h
@@ -1,13 +1,6 @@
#import "UICaboodle.h"
-#import <UIKit/UIView.h>
-
-enum RVUINavBarButtonStyle {
- RVUINavBarButtonStyleNormal,
- RVUINavBarButtonStyleBack,
- RVUINavBarButtonStyleHighlighted,
- RVUINavBarButtonStyleDestructive
-};
+#import <UIKit/UIKit.h>
@class NSString;
@class RVBook;
@@ -23,8 +16,8 @@ enum RVUINavBarButtonStyle {
- (NSString *) leftButtonTitle;
- (UIView *) accessoryView;
-- (RVUINavBarButtonStyle) leftButtonStyle;
-- (RVUINavBarButtonStyle) rightButtonStyle;
+- (UINavigationButtonStyle) leftButtonStyle;
+- (UINavigationButtonStyle) rightButtonStyle;
- (void) _rightButtonClicked;
- (void) _leftButtonClicked;
diff --git a/UICaboodle/RVPage.mm b/UICaboodle/RVPage.mm
index ee85a7e..5d29a26 100644
--- a/UICaboodle/RVPage.mm
+++ b/UICaboodle/RVPage.mm
@@ -1,7 +1,7 @@
#import "RVPage.h"
#import <Foundation/Foundation.h>
-#import <UIKit/UIView.h>
+#import <UIKit/UIKit.h>
#import "RVBook.h"
@@ -24,12 +24,12 @@
return nil;
}
-- (RVUINavBarButtonStyle) leftButtonStyle {
- return [self leftButtonTitle] == nil ? RVUINavBarButtonStyleBack : RVUINavBarButtonStyleNormal;
+- (UINavigationButtonStyle) leftButtonStyle {
+ return [self leftButtonTitle] == nil ? UINavigationButtonStyleBack : UINavigationButtonStyleNormal;
}
-- (RVUINavBarButtonStyle) rightButtonStyle {
- return RVUINavBarButtonStyleNormal;
+- (UINavigationButtonStyle) rightButtonStyle {
+ return UINavigationButtonStyleNormal;
}
- (void) _rightButtonClicked {
diff --git a/UICaboodle/ResetView.h b/UICaboodle/ResetView.h
index c4eb3f7..903bec0 100644
--- a/UICaboodle/ResetView.h
+++ b/UICaboodle/ResetView.h
@@ -1,8 +1,7 @@
#import <RVPage.h>
#import <RVBook.h>
-#import <UIKit/UISectionList.h>
-#import <UIKit/UITable.h>
+#import <UIKit/UIKit.h>
@interface UIView (RVBook)
- (void) resetViewAnimated:(BOOL)animated;