Crash on method Refresh()
KaMagno opened this issue · comments
Original Code
func refresh() {
if maskObject.count > 0 && maskText != text {
text = maskShowTemplate ? maskText : maskStatus == .Clear ? "" : maskText
}
// Reset manual updating property flag
flagUpdateEvent = true
}
The object maskObject was missing the Optional symbol(?) because it can be nil
Solution
func refresh() {
if maskObject?.count > 0 && maskText != text {
text = maskShowTemplate ? maskText : maskStatus == .Clear ? "" : maskText
}
// Reset manual updating property flag
flagUpdateEvent = true
}
Hi, check new version, please