Untitled
Guest 53 16th Dec, 2024
//
import UIKit
protocol myProtocol {
func mySmile(_ controlPoint: CGPoint)
}
class ViewController3: UIViewController {
var delegate: myProtocol?
@IBOutlet weak var smileSlider: UISlider!
@IBAction func goback2(_ sender: UIButton) {
let controlPoint = CGPoint(x: CGFloat(smileSlider.value), y: 50)
delegate?.mySmile(controlPoint)
dismiss(animated: true, completion: nil)
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/
}
To share this paste please copy this url and send to your friends
RAW Paste Data