How can I tell my UIWebView to open links in a new View , using a UINavigationController ?
I found this thread, but i m a little confused of where to implement that piece of code (i m new to objective-C/IPhone)
Clicking a link in UIWebView pushes onto the NavigationView stack
my view just contains a simple WebView with a UINavigationController on top
#import <UIKit/UIKit.h>
@interface ContactViewController : UIViewController {
IBOutlet UIWebView *webView1;
}
@property (nonatomic, retain) UIWebView *webView1;
Here are steps assuming your view controller (that houses the webview) is already within a navigation controller.
Within the .h – ensure your view controller conforms to the webview delegate
Within the .m – add the following code (or just implement this method with whatever logic you want)