调试ok的一些ios代码

//

//  ViewController.m

//  0722

//

//  Created by 范小丽 on 2020/6/10.

//  Copyright © 2020 范小丽. All rights reserved.

//

 

#import "ViewController.h"

 

@interface ViewController ()

 

@end

 

@implementation ViewController

 

- (void)viewDidLoad {

    [super viewDidLoad];

    // Do any additional setup after loading the view.

    //添加yellowView到控制视图self.view

    UIView *yellowView = [[UIView alloc]init];

    yellowView.frame = CGRectMake(100,100, 200, 200);

    yellowView.backgroundColor = [UIColor yellowColor];

    [self.view addSubview:yellowView];

    NSLog(@"yellowView.frame:%@",NSStringFromCGRect(yellowView.frame));

    NSLog(@"yellowView.bounds:%@",NSStringFromCGRect(yellowView.bounds));

    NSLog(@"yellowView.center:%@",NSStringFromCGPoint(yellowView.center));

    

    //添加redView到控制器视图self.view

    UIView *redView = [[UIView alloc]init];

    redView.frame = CGRectMake(300, 300,100, 100);

    redView.backgroundColor = [UIColor redColor];

    [self.view addSubview:redView];

    

    NSLog(@"redView.frame:%@",NSStringFromCGRect(redView.frame));

    NSLog(@"redView.bounds:%@",NSStringFromCGRect(redView.bounds));

    NSLog(@"redView.center:%@",NSStringFromCGPoint(redView.center));

    

    //添加blueView到视图控制器

    UIView *blueView = [[UIView alloc]init];

    blueView.frame = CGRectMake(0, 0,100, 100);

    blueView.backgroundColor = [UIColor blueColor];

    [self.view addSubview:blueView];

    

    NSLog(@"redView.frame:%@",NSStringFromCGRect(blueView.frame));

    NSLog(@"redView.bounds:%@",NSStringFromCGRect(blueView.bounds));

    NSLog(@"redView.center:%@",NSStringFromCGPoint(blueView.center));

 

}

 

-(BOOL)prefersStatusBarHidden{

    return YES;

}

 

-(void)didReceiveMemoryWarning{

    [super didReceiveMemoryWarning];

}

 

 

@end

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值