diff --git a/Examples/SimpleWebBrowser/SimpleWebBrowser/ViewController.m b/Examples/SimpleWebBrowser/SimpleWebBrowser/ViewController.m index 6e8c80c..137bcea 100644 --- a/Examples/SimpleWebBrowser/SimpleWebBrowser/ViewController.m +++ b/Examples/SimpleWebBrowser/SimpleWebBrowser/ViewController.m @@ -44,7 +44,7 @@ - (IBAction)openBrowser:(id)sender { - NSURL *URL = [NSURL URLWithString:@"http://www.techcrunch.com/"]; + NSURL *URL = [NSURL URLWithString:@"http://www.dribbble.com/"]; DZWebBrowser *webBrowser = [[DZWebBrowser alloc] initWebBrowserWithURL:URL]; webBrowser.showProgress = YES; diff --git a/Source/DZWebBrowser.h b/Source/DZWebBrowser.h index 46196bb..ee76eea 100755 --- a/Source/DZWebBrowser.h +++ b/Source/DZWebBrowser.h @@ -30,13 +30,15 @@ #define ALERT_OK NSLocalizedString(@"OK",@"OK") -/** */ +/** A simple iPhone/iPad web browser control. + */ @interface DZWebBrowser : UIViewController -/** */ + +/** The WebView control rendering the web contents. */ @property (nonatomic, strong) UIWebView *webView; -/** */ +/** The current URL showed by the webView. */ @property(nonatomic, strong) NSURL *currentURL; -/** */ +/** If YES, when loading, the navigationBar will show a ProgressView with the loading progress. No private API: AppStore Safe. */ @property(nonatomic) BOOL showProgress; /** @@ -45,17 +47,26 @@ - (id)initWebBrowserWithURL:(NSURL *)URL; /** + * Sets the navigationBar Bar background image of the web browser. + * If a generic UIAppearance has been applied, this will take no effect. * + * @param image The image to be applied. */ -- (void)setNavBarBkgdImage:(UIImage *)navBarBkgdImage; +- (void)setNavBarBkgdImage:(UIImage *)image; /** + * Sets the toolBar background image of the web browser. + * If a generic UIAppearance has been applied, this will take no effect. * + * @param image The image to be applied. */ -- (void)setToolBarBkgdImage:(UIImage *)toolBarBkgdImage; +- (void)setToolBarBkgdImage:(UIImage *)image; -/** +/** Sets custom toolbar images for the web browser controls. + * Duplicate DZWebBrowser.bundle file into your project files, and replace its content keeping the same file names. You should also rename the *.bundle file. + * If no custom images are set, the default ones will be applied. * + * @param bundle The NSBundle object that represents the location the custom web browser control resources. */ - (void)setWebControlsBundle:(NSBundle *)bundle; diff --git a/Source/DZWebBrowser.m b/Source/DZWebBrowser.m index 15432fc..f125e06 100755 --- a/Source/DZWebBrowser.m +++ b/Source/DZWebBrowser.m @@ -179,14 +179,14 @@ #pragma mark Setter Methods -- (void)setNavBarBkgdImage:(UIImage *)navBarBkgdImage +- (void)setNavBarBkgdImage:(UIImage *)image { - [self.navigationController.navigationBar setBackgroundImage:navBarBkgdImage forBarMetrics:UIBarMetricsDefault]; + [self.navigationController.navigationBar setBackgroundImage:image forBarMetrics:UIBarMetricsDefault]; } -- (void)setToolBarBkgdImage:(UIImage *)toolBarBkgdImage +- (void)setToolBarBkgdImage:(UIImage *)image { - [self.navigationController.toolbar setBackgroundImage:toolBarBkgdImage forToolbarPosition:UIToolbarPositionBottom barMetrics:UIBarMetricsDefault]; + [self.navigationController.toolbar setBackgroundImage:image forToolbarPosition:UIToolbarPositionBottom barMetrics:UIBarMetricsDefault]; } - (void)setWebControlsBundle:(NSBundle *)bundle