あるクラスにUibuttonがあり、別のクラスにUitableがあります...
ここで、IndexPAth(特定のセルの位置) を異なるクラスの Uibutton と比較したいと思います...
実際には、別のクラスの異なる異なる Uibutton のメソッドからフェッチしている特定のセルに異なる異なる値を出力したい....
これが私のコードです....
- (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){
lbl.text=@"";
}
else{
lbl.text = [fetchFormArray222 objectAtIndex:0];
}
// [txtView1 setDelegate:self];
lbl.textColor = [UIColor blackColor];
lbl.textAlignment = UITextAlignmentLeft;
[[cell contentView] addSubview:lbl];
}
else {
}