Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15375] iOS: Button backgroundSelectedColor/backgroundDisabledColor property

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionWon't Fix
Resolution Date2014-07-18T15:49:03.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
LabelsbackgroundSelectedColor, button, ios
ReporterMostafizur Rahman
AssigneeIngo Muschenetz
Created2013-09-30T02:14:01.000+0000
Updated2017-03-22T17:50:22.000+0000

Description

New backgroundSelectedColor property for iOS button. Workaround made by "click" listener and some function for changing color doesn't work properly if user hold finger on the button or if user uses more fingers etc. It is hard to fix all these options. For good UX is backgroundSelectedColor necessary.

Comments

  1. Ygor Lemos 2013-10-23

    This should be on 3.2.0 as iOS7 basically flattened almost everything, many buttons have flat color backgrounds, that said, with current Ti versions it is impossible to give the user accurate button pressing feedback (unless using a lot of eventlisteners everywhere). On Android this works perfectly and for parity this should exist for iOS as well. On Interface Builder you can configure backgroundColor, backgroundImage and text color (selectedColor) for all those button states: Default, Highlighted, Selected and Disabled. So basically, selectedColor, backgroundSelectedColor, backgroundSelectedImage, backgroundFocusedColor, backgroundFocusedImage, backgroundDisabledColor, backgroundDisabledImage should all be mapped to work under iOS as this is possible with the native SDK without using events, simply by setting the color / images on Interface Builder. This is related to [#TIMOB-15374]
  2. Gabriel carignano 2014-07-18

  3. Ingo Muschenetz 2014-07-18

    The reason is buried in the comments on TIMOB-15374: "The issue is that AFAIK, backgroundSelectedColor is not natively available on iOS. Hacking around this for parity's sake can lead to a very fragile SDK. backgroundDisabledColor will not supported probably for same reason as backgroundSelectedColor (Properties are not available natively on iOS)" Marking as Won't Fix. There are hacks in the linked tickets if people wish to try and modify this natively.
  4. Gabriel carignano 2014-07-18

    Gotcha!! thanks man, will try to find a solution around those hacks and if I come with any progress I'll share it!
  5. Lee Morris 2017-03-22

    Closing ticket as the issue will not fix and with reference to the above comments.

JSON Source