When I run my playground I’m getting this in the console -
objc[15647]: __weak variable at 0x7fbf98502830 holds 0x7fbf9850003d instead of 0x7fbf98503270. This is probably incorrect use of objc_storeWeak() and objc_loadWeak(). Break on objc_weak_error to debug.
The code in the @objc functions does seem to be slow but I’m not sure if thats just my computer or if it’s got skmethjng to do with this. I’ve got objc funcs for button taps, slider updates etc.
@objc func testFunc() {
let array = para[clicks-1].components(separatedBy: " ")
// print(array)
str += "\(array[i]) "
lbl.text = str
if i == array.count - 1 {
timer.invalidate()
}
i += 1
}
@objc func buttonClicked() {
if clicks == 10 {
hideTut()
} else {
AlSpeak(words: para[clicks])
lbl.text = ""
print("click")
print(clicks)
i = 0
str = ""
clicks = clicks + 1
timer = Timer.scheduledTimer(timeInterval: 0.2, target: self, selector: Selector("testFunc"), userInfo: nil, repeats: true)
}
@objc func sliderUpdate(sender: UISlider) {
print(Int(sender.value))
lbl2.text = String(Int(sender.value))
}
@objc func activateButtonClicked() {
let collider = [floor]
plasmaParticle?.colliderNodes = collider as? [SCNNode]
nozzle.addParticleSystem(plasmaParticle!)
}