tmergulhao / Ambience

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

Not working in code #7

Open sagaya opened 6 years ago

sagaya commented 6 years ago

It is not working when i tried it with my views written programmatically

label.ambience = true
label.contrastColor = .blue
label.invertColor = .green
tmergulhao commented 6 years ago

Hey @sagaya These views have to subscribe to Ambience to be able to work this out. Before you add them to the view hierarchy view.addToSubsview(myAmbienceView), make sure you turn Ambience on just like you did on the Storyboard view.ambience = true.

sagaya commented 5 years ago

Okay, i am adding view.ambience = true in my collectionView awakeNib

ahmadkarkouti commented 5 years ago

Hey guys,

So I set view.ambience = true and I set view.invertColor = .black

But it doesn't seem to work programmatically, and it is only working if I use the storyboard

I have set ambience = true before I add the item to the view.

Screen Shot 2019-05-17 at 9 50 03 PM