xcode4.2でオブジェクトを移動する方法を読みましたが、ボタンの移動に成功しました。しかし、テーブルビューを移動できません。
Viewcontroller.m のコードは次のとおりです。
- (IBAction) unhide {
if (flag==1) {
flag=0;
CGRect frame = testtable.frame;
frame.origin.x = frame.origin.x; // new x coordinate
frame.origin.y = 150; // new y coordinate
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration: 0.25];
testtable.frame = frame;
[UIView commitAnimations];
}
else{
flag=1;
CGRect frame = testtable.frame;
frame.origin.x = frame.origin.x; // new x coordinate
frame.origin.y = 350; // new y coordinate
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration: 0.25];
testtable.frame = frame;
[UIView commitAnimations];
}}
前もって感謝します。