Xamarin iOS使用Scandit执行Segue

时间:2016-03-21 21:21:03

标签: c# xamarin segue xamarin.mac

我正在使用条形码扫描仪抓取条形码然后我想在抓住条形码后立即切换到我的下一个屏幕,我用它来查找一些特定数据。扫描工作正常,当扫描条形码时,方法DidScanBarcode被击中并运行,在这种方法中我尝试执行我的segue但应用程序冻结或崩溃而没有执行segue并且方法PrepareForSegue永远不会被击中在PerformSegue运行之后。有什么想法吗?

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<!DOCTYPE html>
<html>
	<style type="text/css" media="screen">
		#pContainer {
			position: relative;
			overflow: hidden;
			width: 200px;
			height: 200px;
		}
		#pContainer > p {
			position: absolute;
			top: 0;
			left: 0;
			transition: opacity 0.5s linear;
		}
		#pContainer > p.show {
			opacity: 1;
		}
		#pContainer > p.hide {
			opacity: 0;
		}
	</style>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title></title>
	<link rel="stylesheet" href="">
</head>
<body>
	<button onclick="showAdvice()">Advice!</button>
	<div id="pContainer">
    	<p id="text" class="show"></p>
    	<p id="text02" class="hide"></p>
	</div>

    <script>
		function showAdvice() {
		    var advices = ["1","2","3"];
	        var choose = Math.floor(Math.random() * advices.length);

	        $('#pContainer p.hide')
	        	.text(advices[choose])
	        	.removeClass('hide')
	        	.addClass('show')
	        	.siblings('p')
	        	.removeClass('show')
	        	.addClass('hide');
		}
	</script>
</body>
</html>

0 个答案:

没有答案