Hi, for some reason this tableview keeps crashing and it seems like the tableview is unable to display the secondsString for some reason but i have no idea why... please help me out here cause i have no idea what i could be doing wrong..... Thanks!!
#import "SettingsView.h"
@implementation SettingsView
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
transmissionSetup = [[TransmissionSetupViewController alloc] initWithNibName:@"TransmissionSetupViewController" bundle:nil];
transmissionSetup.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
NSLog(@"%i", [self getMinutes]);
[self setSeconds:10];
secondsString = [NSString stringWithFormat:@"%i", [self getSeconds]];
[self.tableView reloadData];
}
#pragma mark Table view methods
// 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:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease];
}
if (indexPath.section == 0) {
cell.textLabel.text = @"Every:";
cell.detailTextLabel.text = secondsString;
}
// Set up the cell...
return cell;
}
@end