//读取图片文件
UIImage *image = [UIImage imageNamed:@"Baseball.png"];
//UIImageView 创建
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
//设置位置及自动调节参数
imageView.center =self.view.center;
imageView.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin|UIViewAutoresizingFlexibleTopMargin;
//将图片放到self.view上
[self.view addSubview:imageView];