Skip to content

Instantly share code, notes, and snippets.

@Choongkyu
Created March 6, 2015 22:48
Show Gist options
  • Save Choongkyu/85950fe6cd380103647b to your computer and use it in GitHub Desktop.
Save Choongkyu/85950fe6cd380103647b to your computer and use it in GitHub Desktop.
uiwebview test
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@property (weak, nonatomic) IBOutlet UIWebView *myWebView;
- (IBAction)refreshButton:(UIButton *)sender;
@end
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
@synthesize myWebView;
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
[myWebView loadHTMLString:@"" baseURL:[NSURL URLWithString:@"http://www.google.com"]];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (IBAction)refreshButton:(UIButton *)sender {
[myWebView reload];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment