2012-04-20 15 views
1

私はindexパスとuiButtonとの比較この可能性はありますか?

...今、私は別のクラスのUibuttonでIndexPAth(特定のセル位置)を比較したい

...別のクラスに一つのクラスでUibuttonとのuitableを持って実際に私は別の印刷します私は別のクラスとは異なり、異なる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 { 
} 

答えて

0

UITableViewのAppleのドキュメントを確認してください。

0

はあなたが使用しようとしましたボタンを押して、他のクラスのfetcheFormArray222をロードしてから、UITableViewをリロードするクラスに新しいフェッチを実行しますか?

+0

ええと、私は他のセルを別のセルでフェッチしたいfetctFormArray333 –

関連する問題