スレッド1のエラーを修正したいEXC_BAD_ACCESS(code = 2、address = 0x30)ボタンをクリックするとこのエラーが発生します。ボタンのコードを以下に示します。
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
DBHandler *db = [[DBHandler alloc]init];
word_id = [[NSString alloc]init];
NSLog(@"String %@",word_id);
[db addFavoriteWord:word_id];
// Do any additional setup after loading the view from its nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (IBAction)nextView:(id)sender {
}
@end