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
Hello! I had issue with delegate. When I tried several methods to assign delegate to another view controller, not that one, which contains HorizontalDial, I had problem: inside VCs delegate is the same object, but inside HorizontalDial object delegate is nil. I tried a lot of fixes in a good way, but helped me only this kludge:
private var delegateTemp: HorizontalDialDelegate? = nil
@IBOutlet public weak var delegate: HorizontalDialDelegate? {
set {
delegateTemp = newValue
}
get {
return delegateTemp
}
}
As you see, I changed delegate from AnyObject? to protocol optional, and have buffer variable delegateTemp. It's not in clean way, but it's works. It's not a big deal, but I bet you can fix it
The text was updated successfully, but these errors were encountered:
Hello! I had issue with delegate. When I tried several methods to assign delegate to another view controller, not that one, which contains HorizontalDial, I had problem: inside VCs delegate is the same object, but inside HorizontalDial object delegate is nil. I tried a lot of fixes in a good way, but helped me only this kludge:
As you see, I changed delegate from AnyObject? to protocol optional, and have buffer variable delegateTemp. It's not in clean way, but it's works. It's not a big deal, but I bet you can fix it
The text was updated successfully, but these errors were encountered: