iOS에서 tableview section을 이용할때 주의사항

tableview에서 section의 headerView와 footerView를 따로 만들어진 view로 지정할때 해당 view의 height이 지정되어 있어야 터치 이벤트가 정상적으로 적용됩니다.

 

kitchensink 예제의 section footer부분을 보시면 footer의 height을 20이라고 지정한 부분이 이에 해당합니다.(아래 소스의 3번째줄)

var footer = Ti.UI.createView({
	backgroundColor:'#111',
	height:20
});

var footerLabel = Ti.UI.createLabel({
font:{fontFamily:‘Helvetica Neue’,fontSize:18,fontWeight:‘bold’},
text:‘Custom Footer’,
color:’#191’,
textAlign:‘left’,
left:10,
width:‘auto’,
height:‘auto’
});

footer.add(footerLabel);

var section = Ti.UI.createTableViewSection();
section.footerView = footer;

 


Facebook Group's likes and commnets
Je Moonjong liked this post