これは、iOS 7 用にアプリを更新して以来ずっと抱えていた新しい問題です。デバイスまたはシミュレーターでアプリを起動するたびに、このエラー コードが表示されます。
RecipeDetailViewController scrollViewDidScroll:]: メッセージが割り当て解除されたインスタンス 0x15746c40 に送信され、クラッシュしました。
NSZombie を有効にすると、それが提供されたコードでした。exc_bad_access コードを与える前に。
これは ScrollViewDidSCroll の私のコードです
- (void)scrollViewDidScroll:(UIScrollView *)scrollView{
// Depending on how far the user scrolled, set the new offset.
// Divide by a hundred so we have a sane value. You could adjust this
// for different effects.
// The larger you number divide by, the slower the shadow will change
float shadowOffset = (scrollView.contentOffset.y/1);
// Make sure that the offset doesn't exceed 3 or drop below 0.5
shadowOffset = MIN(MAX(shadowOffset, 0), 0.6);
//Ensure that the shadow radius is between 1 and 3
float shadowRadius = MIN(MAX(shadowOffset, 0), 0.6);
//apply the offset and radius
self.navigationController.navigationBar.layer.shadowOffset = CGSizeMake(0, shadowOffset);
self.navigationController.navigationBar.layer.shadowRadius = shadowRadius;
self.navigationController.navigationBar.layer.shadowColor = [UIColor blackColor].CGColor;
self.navigationController.navigationBar.layer.shadowOpacity = 0.2;
}