ios - UITableView issue in iPad? -
ios - UITableView issue in iPad? -
i working in ipad application. i'm using uitableview
create table , insert 2 uiimageview
s in each cell. tried set image in both uiimageview
s, index path values start 0,1,2,3,4 etc...
each uiimageview
has same image in first cell. how prepare issue?
example:
- (void)viewdidload { [super viewdidload]; // imagearray have 5images; } - (nsinteger)tableview:(uitableview *)tableview numberofrowsinsection:(nsinteger)section { homecoming [imagearray count]; } - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { static nsstring *cellidentifier = @"cell"; uitableviewcell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier]; imgview1.image = [imagearray objectatindex:indexpath.row]; imgview2.image = [imagearray objectatindex:indexpath.row]; }
after formatting code becomes clear assigning same image array each of 2 image views. need imageviewarray has double amount of members.
also, should not check count of image array row
of index path.
ios ipad uitableview xcode4.3
Comments
Post a Comment