最簡單的推出動畫

初始化需要動畫加載的view 此處爲view。將其放置在動畫開始的位置

infoView.frame=CGRectMake(184, 153,infoView.frame.size.width ,infoView.frame.size.height);

[self addSubview:subjectView];

    [UIView beginAnimations:@"" context:nil];

    [UIView setAnimationDelegate:self];

    [UIView setAnimationDuration:0.15];//動畫時間

    [subjectView setFrame:CGRectMake(0, 153,

                                     subjectView.frame.size.width, subjectView.frame.size.height)];//動畫view結束的位置

    [UIView commitAnimations];





發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章