TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Daniel Doubrovkine.
There are already some solutions to this problem out there but non of them offers this features. First, this solution solves the well-known UIWebView bug that causes erratic behavior when combining "zooming operations" and "landscape orientation". Moreover, the solution presented is highly customizable.
More about me at IndieDevStories.com
TSMiniWebBrowser offers the following features:
As you can see, there are some items that are “optional”. That means that you can configure the browser to display or not those items, depending on your app needs.
Moreover, TSMiniWebBrowser supports 3 presentation modes:
If you are OK with the TSMiniWebBrowser defaults, you can simply use this snippet to create and display the browser:
TSMiniWebBrowser *webBrowser = [[TSMiniWebBrowser alloc] initWithUrl:[NSURL URLWithString:@"http://indiedevstories.com"]];
[self.navigationController pushViewController:webBrowser animated:YES];
If you prefer, you may customize the browser behavior. There is also a simple Demo app within the project. To test the tab bar mode go to the application: didFinishLaunchingWithOptions:
method in AppDelegate.m
and set the BOOL wantTabBarDemo = NO;
value to YES
.
TSMiniWebBrowser *webBrowser = [[TSMiniWebBrowser alloc] initWithUrl:[NSURL URLWithString:@"http://indiedevstories.com"]];
webBrowser.showURLStringOnActionSheetTitle = YES;
webBrowser.showPageTitleOnTitleBar = YES;
webBrowser.showActionButton = YES;
webBrowser.showReloadButton = YES;
webBrowser.mode = TSMiniWebBrowserModeNavigation;
webBrowser.barStyle = UIBarStyleBlack;
if (webBrowser.mode == TSMiniWebBrowserModeModal) {
webBrowser.modalDismissButtonTitle = @"Home";
[self presentModalViewController:webBrowser animated:YES];
} else if(webBrowser.mode == TSMiniWebBrowserModeNavigation) {
[self.navigationController pushViewController:webBrowser animated:YES];
}
As usual, very easy to use ;)
To add the TSMiniWebBrowser component to your project you simply need to drag & drop the entire “TSMiniWebBrowser” folder. There are only two files, apart from the icon images.
This project uses ARC.
Copyright (c) 2012 Toni Sala
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.