アプリを開いUIButton
たUIViewController
ときに表示する「フェードイン」が現在あります。 代わりに、左から右にスライドさせたいと思います。UIButton
「フェードイン」をしっかりと行ったにもかかわらず、左から右にスライドさせる方法がわかりません。私の試みは失敗しました。
何か助けてくれませんか?ありがとう!必要に応じてコードを追加できます-
ViewController.h
@property (weak, nonatomic) IBOutlet UIButton *buttonOne;
ViewController.m
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
NSTimer *timermovebutton = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(movebutton) userInfo:nil repeats:NO];
[timermovebutton fire];
}
-(void) movebuttontwo
{
buttonTwo.alpha = 0;
[UIView beginAnimations:Nil context:Nil];
[UIView setAnimationDelay:0.5];
[UIView setAnimationCurve:UIViewAnimationTransitionCurlUp];
[UIView setAnimationDelegate:self];
[UIView setAnimationDuration:1.0];
buttonTwo.alpha = 1.0;
[UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];
[UIView commitAnimations];
}