私はcellForRowAtIndexPathのテーブルビューのデリゲートメソッドiPhone:テーブルビューcellForRowAtIndexPathメソッドの問題
@interface EventListView : UIViewController <UITableViewDelegate, UITableViewDataSource>
IBOutlet UITableView *tblView;
NSMutableArray *arr_EventValues,*arr_Event_Details;
NSMutableArray *arr_EventListDetails;
@property(nonatomic, retain)NSMutableArray *arr_EventValues,*arr_EventListDetails, *arr_Event_Details;
@property(nonatomic, retain)UITableView *tblView;
- (void)viewDidLoad
{
appdelegate = (VibesGuideAppDelegate *)[[UIApplication sharedApplication] delegate];
ViewCalendar = [[CalendarView alloc] initWithNibName:@"CalendarView" bundle:[NSBundle mainBundle]];
[self.navigationController.navigationBar setHidden:YES];
self.arr_Event_Details = [[NSMutableArray alloc] init];
self.arr_EventValues = [[NSMutableArray alloc] init];
[super viewDidLoad];
}
// Customize the number of sections in the table view.
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
if ([self.arr_EventListDetails count] > 0)
{
return [self.arr_EventListDetails count];
}
return 0;
}
-(UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
// ------------------------------- Custom cell ------------------------------
Customcell *cell = (Customcell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
cell = [[[Customcell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
cell.textLabel.text = @"Hello";
return cell;
}
*でクラッシュする問題に直面しています - [EventListViewのtableView:cellForRowAtIndexPath:]:メッセージが0x60e01b0割り当て解除インスタンスに送信し、私が使用しxibからのテーブルビューとすべての接続を設定し、メソッドのnumberOfRowsInSectionの配列値を取得しましたが、cellForRowAtIndexPathメソッドでは呼び出されませんので、私の問題を考えてください...
ありがとうございます。
私はいくつかのあなたのオブジェクト – Ron
いいえ私は任意のアイデアをリリースオブジェクトではないリリースすると思う?? –
ここにあなたのコードを入れてください。 – Ron