我有一個UIButton在不同的類中的一個類和Uitable ...用uiButton比較Cell的indexpath是否可能?
現在我想用UIButton的不同類別的比較IndexPAth(特定的細胞位置)......
其實我想打印不同關於這一點我是從另一個類不同的不同Uibutton`s方法抓取特定的細胞不同的價值....
這裏是我的代碼....
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
//- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
}
if(indexPath == btn1){ // This is the Line What i want , i am trying this but dont go inside the condition..
UILabel *lbl = [[UILabel alloc] initWithFrame:CGRectMake(200, 5, 290, 60)];
lbl.backgroundColor = [UIColor clearColor];
//lbl.editable = NO;
lbl.font = [UIFont fontWithName:@"Helvetica-Bold" size:25];
// txtView1.text= textviewstring;
// txtView1.text = @"Personal";
if([fetchFormArray222 count]<1){
[email protected]"";
}
else{
lbl.text = [fetchFormArray222 objectAtIndex:0];
}
// [txtView1 setDelegate:self];
lbl.textColor = [UIColor blackColor];
lbl.textAlignment = UITextAlignmentLeft;
[[cell contentView] addSubview:lbl];
}
else {
}
是的,我想獲取另一個在同一個單元格中的其他condtion fetctFormArray333 – 2012-04-20 14:55:37