小编use*_*284的帖子

无法使用AVCapturePhotoOutput捕获照片swift + xcode

我正在开发一个自定义相机应用程序,该教程使用了AVCaptureStillImageOutput,这是ios 10不推荐使用的.我已经设置了相机,现在我不知道如何拍摄照片

这是我的全景,我有相机

import UIKit
import AVFoundation

var cameraPos = "back"

class View3: UIViewController,UIImagePickerControllerDelegate,UINavigationControllerDelegate {


@IBOutlet weak var clickButton: UIButton!
@IBOutlet var cameraView: UIView!
var session: AVCaptureSession?
var stillImageOutput: AVCapturePhotoOutput?
var videoPreviewLayer: AVCaptureVideoPreviewLayer?

override func viewDidLoad() {
    super.viewDidLoad()        
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
}

override func viewDidAppear(_ animated: Bool) {
    super.viewDidAppear(animated)
    clickButton.center.x = cameraView.bounds.width/2
    loadCamera()
}

override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)
 }

@IBAction func clickCapture(_ sender: UIButton) {

    if let videoConnection = stillImageOutput!.connection(withMediaType: AVMediaTypeVideo) {
       // This …
Run Code Online (Sandbox Code Playgroud)

xcode avfoundation ios swift swift3

3
推荐指数
1
解决办法
4974
查看次数

隐藏Phonegap应用程序中的滚动条

在此输入图像描述

嗨,我正在开发一个phonegap应用程序.这是可滚动区域的代码

<div id = "contentoutter" style ="width:'+winwidth+'px;height:'+screendummy+';float:left;overflow-x:hidden;overflow-y:auto;margin-top:'+height50+'px;-webkit-overflow-scrolling: touch;position:relative;">
Run Code Online (Sandbox Code Playgroud)

这段代码是在javascript中,这个div被附加到body.有一个正确的垂直条,我无法摆脱.我怎么摆脱它?

html css android cordova phonegap-build

1
推荐指数
1
解决办法
1674
查看次数

如何从postgres数据库中删除所有索引表?

我的数据库中有很多索引表。我想删除它们并只索引那些非常大的表。我怎样才能删除它们?

我可以

select relname from pg_class where relkind='i'; and drop index
Run Code Online (Sandbox Code Playgroud)

但我认为这个查询也会删除一些系统表。我如何做到这一点而不影响数据库的功能?

postgresql postgresql-9.3

0
推荐指数
1
解决办法
4394
查看次数