2011-11-14 9 views
0

私のUIViewControllerに問題があります。ストーリーボードのこのビューでは、シミュレータには、日付ピッカー、保存ボタン、および編集ボタンが表示されます。しかし、私のテーブルビューは隠されているようです。白い画面のみがあります。私はバックグラウンドでテーブルをスタイリングし、シミュレータに表示された「空の行」よりもスクロールすることはありませんでした。だから、テーブルが見えますが、今は行が...問題は何ですか?テーブルビュー - WHITE画面のみ - コンセントはまだ接続されていますが、行は表示されません

私のアウトレットは.hファイルです: * tableviewはstllに接続されています。

@interface NotifierViewController : UIViewController <UITableViewDataSource,UITableViewDelegate> { 
    IBOutlet UITableView *tableview; 
    IBOutlet UIDatePicker *datePicker; 
    IBOutlet UITextField *eventText; 
    NSMutableArray *notificationsArray; 
    UILocalNotification *notifcation; 
    UISegmentedControl *scheduleControl; 

} 

そしてmy.mファイル内のセル:私は識別子「セル」という名前のインスペクタで

// Customize the appearance of table view cells. 
- (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]; 
    } 

    // Configure the cell... 


    self.notificationsArray = [NSMutableArray arrayWithArray:[[UIApplication sharedApplication] scheduledLocalNotifications]]; 
    notifcation = [self.notificationsArray objectAtIndex:indexPath.row]; 
    //UILocalNotification *notif = [notificationsArray objectAtIndex:indexPath.row]; 
    //NSArray *notificationArray = [[UIApplication sharedApplication] scheduledLocalNotifications]; 
    //UILocalNotification *notif = [notificationArray objectAtIndex:indexPath.row]; 

    //Was in der Zelle als Titel steht 
    //[[cell textLabel] setText:[notifcation alertBody]]; 
    [[cell textLabel] setText:@"alarm"]; 
    //[cell.detailTextLabel setText:[notif.fireDate description]]; 

    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; 
    [dateFormatter setDateFormat:@"dd.MM.yyyy HH:mm"]; 
    [[cell detailTextLabel] setText:[dateFormatter stringFromDate:notifcation.fireDate]]; 
    [dateFormatter release]; 
    return cell; 
} 

、あまりに スタイルが基本であると私はコンテンツのセクションでダイナミックプロトタイプに決定1細胞。

答えて

0

私のデフォルトでした...

私はMyViewControllerにデリゲートやデータソースを接続する必要があります。

インスペクタビュー:

アウトレット:

  • デリゲート - > MyViewController
  • のdataSource - > MyViewController

参照アウトレット:

  • mytableView - > MyViewController
関連する問題