UIView を動的に追加する方法のほとんどを理解しましたが、今では uibutton がクリックされて uiview が表示されたときにアルファ アニメーションを作成しようとして立ち往生しています。ここで何が欠けているのかわからない:
- (void)buttonPressedAction:(id)sender
{
CGRect frame;
frame.origin.x = 0;
frame.origin.y = 0;
frame.size = self.scrIcon.frame.size;
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0];
UIView* view = [[UIView alloc] initWithFrame:frame];
view.alpha = 1.0;
[UIView commitAnimations];
view.backgroundColor = [UIColor redColor];
[scrIcon addSubview:view];
/*
UIStoryboard* sb = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:[NSBundle mainBundle]];
CategoryViewController* theView = [sb instantiateViewControllerWithIdentifier:@"categoryIdentifier"];
theView.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:theView animated:YES];*/
}
scrIcon は UIScrollView です
ありがとう