Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

How add itemclick in listview ?(iOS)

$
0
0

Hi, i have listview in alloy .xml

code:

<ListView id="listView" defaultItemTemplate="template">
        <Templates>
            <ItemTemplate  id="template" name="template">
            <Label id="testClick" bindId="testClick"/>
            </ItemTemplate>
        </Templates>
    </ListView>
</Alloy>
 
$.listView.addEventListener('itemclick', function(e){
Ti.API.debug('Log ListView', JSON.stringify(e));//not work on ios, work on android
});
Documentation :

On iOS, the itemclick event does not fire if you click on a control, such as a button or switch, even though the control might animate in response to the click. You need to add a click event to the child template of the control.

how add click event?


Viewing all articles
Browse latest Browse all 8068

Trending Articles



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