我想知道如何将jQuery插件(https://github.com/thegrubbsian/jquery.ganttView)添加到UIWebView中,因为我想用它来显示甘特图?
请告诉我是否有我应该遵循的教程或步骤?
谢谢,卡尼什卡。
发布于 2013-05-13 18:48:51
可以有一个像这样的.html文件-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>TITLE</title>
<script type="text/javascript" src="Plugin.js"></script>
<link type="text/css" href="Plugin.css" rel="stylesheet"/>
</head>
<body>
<div id="Pluginwrapper">
<div id="Plugincontainer"></div>
</div>
</body>
</html>在应用程序包中有.html file, .js file and .css(即所有插件文件)文件,为了在UIWebView中显示内容,只需将.html文件和.js文件作为Xcode的构建阶段选项卡<>E211>中的代码包资源。
然后使用-
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"htmlfile" ofType:@"html"] isDirectory:NO]]];https://stackoverflow.com/questions/16519920
复制相似问题