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

Alloy - Show and animate a child view from a tableview

$
0
0

I have a table view and want to on clicking a row instantiate an events controller (with the view being just a couple of labels) and animate it in.

I have the following code:

index controller

$.eventsTblVw.addEventListener("click", function (e) {
    var data = e.rowData,
        tabelViewData = {
            "title" : data.title,
            "eventId" : data.eventId
        }
    $.event = Alloy.createController('event', tabelViewData);
    $.event.init();
})
Which I then successfully instantiate (but not show) the events view
var args = arguments[0] || {};
Ti.API.info('event controller ' + args.title);
Ti.API.info('event controller ' + args.eventId);
// Set the labels with the info
$.title = args.title;
$.eventId = args.eventId;
 
$.init = function() {
    // Does not work
    $.eventWindow.animate({
        right:0,
        duration:250
    }, function() {
        $.eventWindow.focus();
    });
};
I'm not sure how I am suppose to show the view and animate the view correctly. Really easy for someone I'm sure!

Viewing all articles
Browse latest Browse all 8068

Trending Articles



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