Quantcast
Viewing all articles
Browse latest Browse all 28

When Ti.UI.Switch will fire the 'click' event. TIMOB-3297

What is the state of issue https://jira.appcelerator.org/browse/TIMOB-3297. I relly need a clickable Ti.UI.Switch on iOS. My case is as follows: i have a tableView. Each row of this tableView contains label and switch. I decided not to listen 'click' event from each label or switch. Instead I added listener on 'click' event to the tableView and made so

serviceTable.addEventListener('click', function(e){
                if(e.source instanceof Ti.UI.Label){
            ....
                }
                else if(e.source instanceof Ti.UI.Switch){
            ....
                }
        })
Thus, i need the switch to be 'clickable'. Additionaly i see very strange reaction on ios on execution "e.source instanceof Ti.UI.Label". I receive the error with the message "Undefined is not a valid argument for 'instanceof' (evaluating t instanceof Ti.UI.Label)". On Android this expression works fine.

Titanium SDK 3.1.0.GA


Viewing all articles
Browse latest Browse all 28

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>