0
嗨,大家好我寫了一個簡單的應用程序,在web視圖中顯示一個html文件,該html文件在主包中。 我不知道我怎樣才能使HTML文件字體大小大/小由兩個按鈕 這是我的.m更改按一個按鈕的HTML字體大小
#import "ViewController.h"
@interface ViewController()
@end
@implementation ViewController
@synthesize webView;
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"jama" ofType:@"htm"]isDirectory:NO]]];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (IBAction)increase:(id)sender {
}
- (IBAction)decrease:(id)sender {
}
@end
,這是我的HTML文件,該文件是在我的主束
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1265.21">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; text-align: left; font: 21.0px 'Geeza Pro'}
</style>
</head>
<body>
<p dir="rtl" class="p1"><b> hello </b></p>
</body>
</html>
也許是因爲我剛剛接觸編程,我不明白,請你簡化答案 – ALz 2014-08-27 17:09:31