Swift - Fix print issue and pass variables to a class to finish drawing

완료 등록 시간: 3년 전 착불
완료

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()

}

}

스위프트 아이폰 아이패드 코코아

프로젝트 ID: #27995771

프로젝트 소개

2 건(제안서) 재택 근무형 프로젝트 서비스 이용 중: 3년 전

수상자:

ethanblount1

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

$25 USD / (1시간 기준)
(2건의 리뷰)
2.7

이 일자리에 대한 프리랜서 2 명의 평균 입찰가: $23 (1시간 기준)

harshthakur23

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 기타

$20 USD / (1시간 기준)
(3 리뷰)
1.5