Reputation: 42139
Does anyone know if there are any open source solutions out there that use UIWebview to build a full browser? There is something like this in Three20 when you pass a URL, but I am assuming there must be other alternatives out there.
I realize that UIWebView is a web browser, but hooking up refresh, back button, URL bar, etc will take extra time.
Suggestions?
Upvotes: 4
Views: 13981
Reputation: 79
https://github.com/ghostery/banshee
EDIT the project is now maintained here: https://github.com/acatighera/banshee
It's an open source browser with tabs, bookmarks, search, etc.
Upvotes: 5
Reputation: 2088
You can also check out KINWebBrowser, a drop in web browser module for your apps. https://github.com/dfmuir/KINWebBrowser
Features
Upvotes: 1
Reputation: 939
I have started an open source project (MIT License) to make something as close as possible to the native MobileSafari application (on iPhone and iPad).
Here are the features so far :
Anyone wanting to contribute to this project is welcome to do it !
You can clone/fork the project here : https://github.com/sylverb/CIALBrowser
Upvotes: 5
Reputation: 73608
UIWebView
is a full browser ! To open a url in webView
you do this -
NSURL *url = [NSURL URLWithString:webAddress];
NSURLRequest *req = [NSURLRequest requestWithURL:url];
[webView loadRequest:req];
You can even insert javascript into UIWebView
. You could customize it to your liking.
//To customize the look & feel...
self.webView.scalesPageToFit = YES;
self.webView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
self.webView.autoresizesSubviews = YES;
//To insert Javascript
NSString *jsCommand = [NSString stringWithFormat:@"document.body.style.zoom = 0.5;"];
[self.webView stringByEvaluatingJavaScriptFromString:jsCommand];
You could do lot more. Have fun...
UPDATE: To get a back button and all, webView
provides those features, back, forward etc. all those browser features. You need to code up the buttons & UI & for code you could do this -
-(IBAction)goForward:(id)sender
{
[webView goForward];
}
-(IBAction)goBack:(id)sender
{
[webView goBack];
}
-(IBAction) gotoHome:(id)sender
{
NSString *urlAddress = @"http://google.com";
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[webView loadRequest:requestObj];
}
Upvotes: 3