当我当前选中的标签栏是标签时,我会滚动到uitableview的顶部。我有一个导航栏,例如instagram或twitter,你可以看到当再次点击选定的标签栏时,表格视图滚动到视图的顶部。我该怎么做?
答案 0 :(得分:1)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
</head>
<body onResize="fit();">
<embed
type="application/pdf"
src="http://www.adobe.com/security/pdfs/riskcompliance_faq.pdf"
id="pdfDocument">
</embed>
<script type="text/javascript">
fit();
function fit() {
var myWidth = 0, myHeight = 0;
if( typeof( window.innerWidth ) == 'number' ) {
//Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
//IE 6+ in 'standards compliant mode'
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
//IE 4 compatible
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
document.getElementById('pdfDocument').width = myWidth;
document.getElementById('pdfDocument').height = myHeight;
}</script>
</body>
</html>
控制器的只需编写此代码
in override fun viewDidAppear()
此代码表行的应大于或等于1
请找到项目与问题解决方案的链接