2012-03-21 8 views
-2

テーブルを作成する簡単なコードを書くと、エラーが発生しました。_CGRect referenced Fromエラーが発生しました。私はこのエラーを解決する方法を知らない。私もIphone用Xcodeのテーブル作成

static NSString *SimpleTableIdentifier = @"SimpleTableIdentifier"; 
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier: SimpleTableIdentifier]; 
if (cell == nil) 
{ 
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier: SimpleTableIdentifier] autorelease]; 
} 

NSUInteger row = [indexPath row]; 
cell.text = [listData objectAtIndex:row]; 
return cell; 

答えて

0

私のプロジェクトにCoreGraphicsフレームワークを追加しましたあなたの

cell initWithFrame 

方法、私はTHTがあなたのためにそれをやるべきだと思うで

CGRectMake(0,0,widthOfCell,heightOfCell) 

を試してみてください。

+0

Uにdude.But Iドンありがとう「あなたはもちろんのこと –

+1

ような任意のMethodeのVEの。あなた自身のコードをチェックしてください。 cell = uitableviecell initwithframe –

関連する問題