tmergulhao / Ambience

An ambient light accessibility framework for iOS.
MIT License
448 stars 15 forks source link

public override func ambience(_ notification : Notification) method not called #5

Open roei46 opened 6 years ago

roei46 commented 6 years ago

Hi , i am trying implementing the above method and in contrast to the example you gave, in my project it is not called but the color do change accordingly to what i fixed in the story board, any suggestions? (using swift 4 and xcode 9.3 ) thanks in advanced !

bpisano commented 6 years ago

Hi, I actually have the same problem. Everything should be correct. I have implemented _ = Ambience.shared in AppDelegate. I have subclassed a UIButton. In awakeFromNib() I've set ambience = true. But override func ambience(_ notification: Notification) is never called. Using Xcode 9.3.1 and Swift 4.

roei46 commented 6 years ago

yes... i have managed to do some walk-around but it is not the classiest solution and it has a lot of bugs. Also i didnt got any answer from this dude so i am thinking on not use that pod.

bpisano commented 6 years ago

I'm looking for other solutions but it seems to be the easiest to use and that support IBDesignable. Maybe we should wait for iOS 12 🤷‍♂️

roei46 commented 6 years ago

Wanna tell me about IBDesignable?