You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func setup() {
addSubview(leftButton)
addSubview(rightButton)
addSubview(label)
backgroundColor = buttonsBackgroundColor
layer.cornerRadius = cornerRadius
clipsToBounds = true
//Commented this line out
NotificationCenter.default.addObserver(self, selector: #selector(GMStepper.reset), name: NSNotification.Name.UIApplicationWillResignActive, object: nil)
}
Whenever the applicationWillResignActive AppDelegate function was being called, the reset() function would cause a 'found nil while unwrapping an optional value' error. Not sure why the steppers need to be reset when the application resigns, honestly. I commented the observer out and it seems to work fine. If I'm wrong in this, or there's a better way to fix this error, please do inform me. Thanks!
The text was updated successfully, but these errors were encountered:
Whenever the applicationWillResignActive AppDelegate function was being called, the reset() function would cause a 'found nil while unwrapping an optional value' error. Not sure why the steppers need to be reset when the application resigns, honestly. I commented the observer out and it seems to work fine. If I'm wrong in this, or there's a better way to fix this error, please do inform me. Thanks!
The text was updated successfully, but these errors were encountered: