美文网首页
UIImageView 纯代码 布局·使用

UIImageView 纯代码 布局·使用

作者: xq9527 | 来源:发表于2023-03-13 18:03 被阅读0次

前言

纯属笔记学习

效果图

image.png
//
//  ViewController.m
//  UIImgaeview纯代码使用
//
//  Created by xuqing on 2023/3/14.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
   
    UIImageView * iv=[[UIImageView alloc] init];
    //UIimgaeview 表示一个图片对象
    iv.image= [UIImage imageNamed:@"huoying"];
    iv.frame=CGRectMake(50, 100, 300, 300);
    [self.view addSubview: iv];
   
}


@end

最后总结:

记录今天都学习 每天进步一点好好学习 天天向上 。

相关文章

网友评论

      本文标题:UIImageView 纯代码 布局·使用

      本文链接:https://www.haomeiwen.com/subject/bfwcrdtx.html