我有这组代码:
MOLPay = MOLPayLib(delegate: self, andPaymentDetails: paymentRequestDict)
let navigationController = UINavigationController(rootViewController: MOLPay)
let btn: UIButton = UIButton(frame: CGRectMake(0, 0, 35, 35))
btn.setImage(UIImage(named: "scan_ic_back.png"), forState: UIControlState.Normal)
btn.addTarget(self, action: #selector(MolPayNowViewController.closeMolPay(_:)), forControlEvents: UIControlEvents.TouchUpInside)
let barButton = UIBarButtonItem(customView: btn)
MOLPay.navigationItem.leftBarButtonItem = barButton
MOLPay.navigationController?.navigationBar.barTintColor = UIColor(hexString: "#76DD4A")
self.presentViewController(navigationController, animated: true, completion: nil)
它变得像这样,我想显示适合屏幕大小的页面大小,但是如何做到这一点?自从它的嵌入式导航控制器。有人可以帮忙。
我想要的是:
答案 0 :(得分:0)
您的问题是UIWebView
没有调整其内容的大小以使其适合手机的屏幕。我是对的吗?
要使整个网络视图的内容适合屏幕,请在视图控制器中执行此操作:
yourWebView.scalesPageToFit = true