Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

Here’s a ‘glow-in-the-dark’ effect achieved by reading the device’s ambient light sensor and partially dimming the UI 💡

547,137 görüntüleme • 3 yıl önce •via X (Twitter)

10 Yorum

Alex Widua profil fotoğrafı
Alex Widua3 yıl önce

Played around with dynamic backgrounds too. They’re not so much different from time-based day/night backgrounds but the gradual changes make it pretty interesting.

Alex Widua profil fotoğrafı
Alex Widua3 yıl önce

The demos are not actually reading the ambient sensor though (couldn’t get SensorKit permissions to work). Instead the luminosity is calculated using the device’s camera exposure. I grabbed the snippet from SO user AnuradhaH (

Alex Widua profil fotoğrafı
Alex Widua3 yıl önce

Having a lot of fun with these little SwiftUI explos recently. I’m learning a lot by just taking apart and remixing @philipcdavis’ and @jsngr’s prototypes — totally worth to check out Philip’s prototyping kit and Jordan’s repos

Ryan McLeod profil fotoğrafı
Ryan McLeod3 yıl önce

Ugh I wish the actual light sensor was available to us, still really cool!!

Alex Widua profil fotoğrafı
Alex Widua3 yıl önce

yeah, would be fun to build some web prototypes with it :-) Yesterday I learnt that there used to be a DeviceLight API many years ago ( Never made it past the experimental feature flag though...

Duy Luong profil fotoğrafı
Duy Luong3 yıl önce

Dang 🤩! You really triggers me to learn Swift/SwiftUI again. Was it done in SwiftUI?

Alex Widua profil fotoğrafı
Alex Widua3 yıl önce

yup, SwiftUI :-) The code is up on GitHub

alexsm.eth ⠕🍌 profil fotoğrafı
alexsm.eth ⠕🍌3 yıl önce

Do you think apple would allow this though? Seems like an accessibility dark pattern 🧐

Prerna Singh profil fotoğrafı
Prerna Singh3 yıl önce

@AdityaP11966861

FLO.CHAU profil fotoğrafı
FLO.CHAU3 yıl önce

@charlesbail_

Benzer Videolar