BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Styled button color changes not working correctly under iOs


#1

I have a project where I am regularly (e.g. every 30 seconds) updating the color of styled buttons using the setProperty function.

The application works perfectly on Android but on iOs devices the colors are not updating correctly.

For example, I have a button that is originally set up with an off background color of white and and on background color of light blue using the blynk app in design mode. When my project runs, the off background color is sometimes set to grey, and sometimes set to white.

When using an iOs device (I have tried an iphone 8 and an ipad air) the button will initially display correctly (matching the same project running simultaneously on an android device). Then when the off background color is changed by a setProperty instruction, the iOs device button changes to the originally set ON background color and does not respond to further setProperty instructions (while the project running simultaneously on the android device does change color correctly).

If on the iOs device I then switch from “run” to “design” and back to “run”, the iOs button will then change color and match the android device - until another setProperty command is executed and the button goes back to the on background color.

The button on the iOs device is defined as "push’ and during the above sequence is not being touched.

There is no problem with the setProperty off background label function, my project changes the label as well as the color and the label changes work correctly on the iOs devices.

Both android and iOs devices are running the latest version of the app and my Blynk server on Raspberry pi is currently on version 0.40.1.

Has anyone else experienced anything like this? Any ideas?


#2

Just a title with spelling errors is not a proper post… :frowning_face:

The styled button colour properties DO work, but they use special commands as there are many more of them for a single widget… Search and ye shall find :stuck_out_tongue_winking_eye:

As per… New Android Release 2.22.0
And these commands work fine on the iOS beta App - iOS 2.25.0 Beta Release

Styled Button has no ‘color’ property… use these instead.

onColor (Text)
onBackColor
offColor (Text)
offBackColor


#3

Apologies for the premature post - has now been edited and outlines the issue. Any thoughts?


#4

Make sure you are running the Beta version of the iOS App… it seems to work perfectly in my tests.

PS This is NOT necessarily a bug issue (the need to use beta apps), rather more like a mid-development process. Hope you understand.


#5

You might want to update this as well… current is 0.41.2


#6

I certainly understand and that’s the main reason I made the post - just providing some feedback on an aspect of Blynk that has me puzzled.

I have the iOs devices on 2.25.0(3) - is that the latest?

I have another project that has styled button color changes and it seems to work ok on both platforms. The only difference seems to be that the setProperty commands don’t occur as often.

Strange.


#7

If you are unsure if you are using the Beta versions (of both iOS and Android) … then you are NOT using the Beta version :stuck_out_tongue: Click on the link above to see the process for the iOS. And here for the Android - Android Open Beta. Version 2.27.0 (Image widget)

I have found with these new widgets, and ones in beta, it is necessary to have everything running the latest versions of everything (and all phone/tablet types the same versions as each other - E.g NOT one iOS phone beta and one not, etc)… else, yes, strange changes can occur.


#8

Thanks Gunner.

I’ll do some more exploring of the issue when I get time. I’ve been a keen Blynker for the past couple of years - mainly custom home automation and model trains stuff.

Appreciate what you do.

Regards


#9

Check out some of @DaleSchultz stuff - Heavy current, dimming room lights with multiple control systems

And @Lichtsignaal - Lego Trains Older Topic, but I understand he has more advanced stuff somewhere :stuck_out_tongue: (NOT that LEGO is not advanced… I am a huge fan of it still)