Swift - Fix print issue and pass variables to a class to finish drawing
$15-25 USD / hora
My code needs two fix:
1) It is not printing within the functional call
2) pass the variable so the class can draw correctly
Code sample below
public func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) {
print ("my test")
var x1 = 50
let y1 = 100
let x2 = 10
let y2 = 10
let x3 = 200
let y3 = 200
let x4 = 350
let y4 = 100
}
class DrawView: UIView {
override func draw(_ rect: CGRect) {
let context = UIGraphicsGetCurrentContext()
context?.setLineWidth(10.0)
context?.setStrokeColor([login to view URL])
context?.move(to: CGPoint(x: x1, y: y1))
context?.addLine(to: CGPoint(x: x2, y: y2))
context?.strokePath()
let context2 = UIGraphicsGetCurrentContext()
context2?.setLineWidth(10.0)
context2?.setStrokeColor([login to view URL])
context2?.move(to: CGPoint(x: x3, y: y3))
context2?.addLine(to: CGPoint(x: x4, y: y4))
context2?.strokePath()
}
}
Nº del proyecto: #27995771
Sobre el proyecto
Adjudicado a:
Hi, there Q:Which data are you capturing now from the camera? Q: Did you use Vision Image? I want to know about capturing data at first Thank you Ethan Blount
2 freelancers están ofertando un promedio de $23 / hora por este trabajo
hello 1) are you sure, below function is being called , so that it can print whatever needed? check with breakpoints. I thik this delegate method you called is wrong. let me check code for this once public func capt Más