मैं हाल ही में एक svg map ऐप पर काम कर रहा हूं। आईओएस 7 पर सब ठीक चल रहा है। जब मैं अपनी परियोजना को ios8 पर ले जाता हूं। अजीब चीजें हुईं, मैंने पाया कि UIWebview स्थानीय HTML फ़ाइल को पढ़ता है जिसमें एक svg फ़ाइल एम्बेडेड है, svg फ़ाइल ios8 पर नहीं दिखाई देगी।ios8 UIWebview svg embaded html दिखाया नहीं गया
नमूना कोड यहाँ है:
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
NSString *path = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"html"];
NSURL *fileURL = [[NSURL alloc] initFileURLWithPath:path];
NSURLRequest *req = [NSURLRequest requestWithURL:fileURL];
[self.webView loadRequest:req];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
@end
और html प्रयुक्त फाइल:
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>SVG DEMO</title>
</head>
<body>
<div>
<embed src="410.svg" width="64" height="64" type="image/svg+xml" />
<object type="image/svg+xml" data="410.svg" width="64" height="64" border="1"></object>
</div>
</body>
</html>
किसी को भी पता है क्या हो रहा है?
धन्यवाद
परीक्षण किया है आईओएस 8.1 अद्यतन हालांकि यह स्थिर एसवीजी के लिए काम करता है, यह मदद नहीं करता है जब एसवीजी स्क्रिप्ट में शामिल है। – walker