开发者

Thread 1: Program received signal:"Sigbart 1"

开发者 https://www.devze.com 2023-03-15 03:58 出处:网络
When I run the app in the iPhone Simulator, everything works just fine .. but with time I\'ll try to get my iPhone

When I run the app in the iPhone Simulator, everything works just fine .. but with time I'll try to get my iPhone

Thread 1: Application Received signal:" Sigbart 1"

why?

Her开发者_开发问答e is the code:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{   

golfbaner *detailViewController = [[golfbaner alloc] initWithNibName:@"Golfbaner" bundle:nil];

detailViewController.golf = [banenavn objectAtIndex:indexPath.row];

[self.navigationController pushViewController:detailViewController animated:YES];
[detailViewController release];

}

XCode says it's HERE:

[self.navigationController pushViewController:detailViewController animated:YES];

it goes wrong

I can admit that I'm quite a beginner.... lol


seems to be u are new bee.so here i assume u would be created the golfbaner with nib file .so it would be same as filename for nibname.

Golfbaner.NIB is not with your project.//check out this

maybe like golfbaner.NIB

so use

golfbaner *detailViewController = [[golfbaner alloc] initWithNibName:@"golfbaner" bundle:nil];


Most likely is that detailViewController is nil. If you look at the console output it will tell you for certain.

The reason its nil on hardware is that the file system is case sensitive on hardware and hence

golfbaner *detailViewController = [[golfbaner alloc] initWithNibName:@"Golfbaner" bundle:nil];

"Golfbaner" != "golfbaner"

Check your nibname for case match. I suspect its "golfbaner.xib".

See iOS Objective-C Image file name/path different behavior betwewen simulator and device

As a style point class names should be capitalised otherwise it makes a class hard to separate from a variable when reading code.


It may be spelling mistake after @"Golfbaner" just copy nibfile name and paste it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号