在学生能够看到班级时间表的监听器中,I m 制成一个“ iPhone”。
I have a JSON response where it brings me the classrooms with these attributes:
- day
- hour
- class
- professor
举例来说,这是一个具有类似意义的阵列:
[monday,8:00,math,sofia heelter]
[monday, 10biology,andrea sulivan]
[friday,8:00,math,sofia heelter]
我收到这些参数,并用本法典的<编码>可调频显示这些参数:
for (var i = 0; i < response.classrooms.lenght; i++)
{
var day= response.classrooms[i].day;
var hour= response.classrooms[i].hour;
var materia= response.classrooms[i].class;
var professor= response.classrooms[i].professor;
var row = Titanium.UI.createTableViewRow({height: auto });
var post_view = Titanium.UI.createView({
height: auto ,
layout: vertical ,
top:5,
right:5,
bottom:5,
left:5
});
var text= Titanium.UI.createLabel({
text:text,
top:0,
left:0,
bottom:15,
height:48,
width:300,
font:{fontFamily: helvetica ,fontSize:20}
});
post_view.add(text);
// Add the post view to the row
row.add(post_view);
// Give each row a class name
row.className = "item"+i;
// Add row to the rowData array
rowData[i] = row;
}
因此,问题是......
How can I assign to each class (I mean the university classroom that is shown above) which is in a row to have a child?
因此,当我点上两行时,我就把儿童的观点带上了他们的教室。 我关心教室,我只想把一名儿童分配给每一个牢房。