help me, please, I'm new to Swift.
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesBegan(touches, with: event)
var flag = false
print(" current-> \(flag)") /** Add a breakpoint **/
if flag == true {
print(" after -> true")
}else {
print(" after -> false")
}
}
I want to use lldb to modify the value of 'flag', so,
(lldb) po flag
false
(lldb) expression flag = true
(lldb) po flag
true
(lldb) continue
2018-11-24 23:57:05.552804+0800 test_swift_lldb[6806:384106] XPC connection interrupted
Process 6806 resuming
current-> false
after -> false
It doesn't seem to be useful. Please tell me how to use lldb, modify the bool value.