本文主要是介绍Snail—UI学习之动画Animations,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
直接上代码,看的不深,以后再做详细讲解
#import "WJJRootViewController.h"@interface WJJRootViewController (){//把view设为全局变量UIView * _view;
}@end@implementation WJJRootViewController- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];if (self) {// Custom initialization}return self;
}- (void)viewDidLoad
{[super viewDidLoad];// Do any additional setup after loading the view.self.view.backgroundColor = [UIColor grayColor];_view = [[UIView alloc] initWithFrame:CGRectMake(300, 400, 20, 20)];_view.tag = 250;_view.backgroundColor = [UIColor purpleColor];[self.view addSubview:_view];//动画执行第一种方法UIButton * button1 = [UIButton buttonWithType:UIButtonTypeSystem];button1.tag = 1;button1.frame = CGRectMake(0, 460,
这篇关于Snail—UI学习之动画Animations的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!