0
다음과 같이 일부 이미지 뷰를 생성합니다.클릭 이벤트를 수신 대기하는 방법 appcelerator의 이미지보기 그룹
// Time buttons
var timeButtons =[
{ title: 'Afternoon', path: 'images/others/time/afternoon.png'},
{ title: 'CurrentTime', path: 'images/others/time/currenttime.png'},
{ title: 'Evening', path: 'images/others/time/evening.png'}
]
createButtons(timeButtons);
/* Button creation function */
function createButtons(data){
for (var i = 0; i < data.length; i++){
//Creating each button
var button = Titanium.UI.createImageView({
image: data[i].path,
height: 90,
width: 90,
top: 20+90*i+20*i,
value: 1
});
//Adding the buttons to the center view
centerButtons.add(button);
}
}
사용자가 imageView 중 하나를 클릭하면 클릭 한 이미지 뷰를 식별하고 이에 따라 작업을 수행합니다.