I have a view that has a table for displaying a list of contacts and another view for its details. The problem is when I open the contact view, then it works fine; but when I open it, go to the detailed view of the contact and click, then it will fail. It shows me an error as shown below.
Confirmation error in - [UITableView _createPreparedCellForGlobalRow: withIndexPath:], / SourceCache / UIKit_Sim / UIKit-1914.84 / UITableView.m: 6048.
Application termination due to the uncaught exception "NSInternalInconsistencyException", reason: "UITableView dataSource not set"
I watched this in iOS 8.0.2, which works fine on iOS 7.0. Is there anything related to the iOS version.?
The same thing happens in the message module. Here I place the code snippet.
MessageListController.m
- (void)viewDidLoad { [super viewDidLoad]; } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:YES]; self.tabBarController.tabBar.hidden = FALSE; instanceMessageList.delegate = self; instanceMessageList.dataSource = self; [self setNavigationBarView]; } - (void)viewDidUnload { [super viewDidUnload]; } - (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; [self setEditing:FALSE animated:YES]; } - (void)dealloc { [instanceMessageList release]; [super dealloc]; }
MessageListViewController.h
@interface MessageListViewController : UIViewController <UITableViewDelegate, UITableViewDataSource,NSFetchedResultsControllerDelegate, MessageDelegate, UIActionSheetDelegate> { #pragma mark - #pragma mark Instance variable declaration IBOutlet UITableView *instanceMessageList; IBOutlet UILabel *noMessages; } #pragma mark - #pragma mark Instance variable property declaration @property (nonatomic, retain) UITableView *instanceMessageList; @end
source share