tags:

views:

67

answers:

2

the numberOfRowsInSection returns 0 when i press navigation controller's back button, but - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath is called when i put break point...application crashes ..any help please?

A: 

Try to make the numberOfRowsInSection method return 1

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 
{
    return 1;
}
MrThys
i tried it.. it did not work....
Mikhail Naimy
Can you show the code of your UITableViewDelegate?
MrThys
A: 

you should set the delegate of tableview to nil, dealloc before releasing your table view like this:

- (void)dealloc{

[myTableView setDelegate:nil];
[myTableView release];
myTableView = nil;

}

besides are you trying to reload the table in viewWillDisappear, if yes you should avoid it and find a workaround for this.

Hope this helps.

Madhup