0
UIImageViewを画面に表示するアニメーションのコードを記述しましたが、構文は正しいようですが、ビルド時にはわかりにくい "internal compiler error: Bus error: 10
"が表示されています。どんな考え?内部コンパイラエラー:バスエラー:10
-(IBAction)shakeCircle{
int d = 3;
[UIView animateWithDuration:0.05
animations:^{myCircle.center = CGPointMake(myCircle.center.x+d, myCircle.center.y-d);}
completion:^(BOOL finished){
[UIView animateWithDuration:0.05
animations:^{myCircle.center = CGPointMake(myCircle.center.x-d, myCircle.center.y+d);}
completion:^(BOOL finished)
{
//but if I comment from here..
[UIView animateWithDuration:0.05
animations:^{myCircle.center = CGPointMake(myCircle.center.x+d, myCircle.center.y-d);}
completion:^(BOOL finished){
[UIView animateWithDuration:0.05
animations:^{myCircle.center = CGPointMake(myCircle.center.x-d, myCircle.center.y+d);}
];
}
];
//... to here the code will build.
}
];
}
];
}
注私はアニメーションコードの最後の5行をコメントアウトした場合、すべてがは何が起こっているか ....罰金コンパイルされることを?
私は別のコンパイラに切り替えようとしましたが、うまくいかなかったのです。私はちょうど1つがmyCircle
であることを確かめました、そして、それが今までに参照される唯一の時間は、それが宣言されると、そのメソッドであるということです!
StackOverflowやGoogleの検索機能が壊れていますか? http://stackoverflow.com/questions/7035640/xcode-bus-error-when-compiling –
氏Bull、私は投稿する前に同様の質問を見て、私は私の問題の根本は異なると思う。 – Eric
あなたの質問を編集し、あなたが試したことを人々に伝えた場合に役立ちます... –