iOS 部分API理解

來源:互聯網
上載者:User

標籤:api   類型   部分   load   log   渲染   ram   不同   fabs   

- (void)viewDidLoad {    [super viewDidLoad];    // Do any additional setup after loading the view, typically from a nib.        UIImageView *imageView = [[UIImageView alloc]initWithImage:[[UIImage imageNamed:@"AppIconImage"] imageWithRenderingMode:UIImageRenderingModeAutomatic]];   //根據圖片所在的位置不同來自動選擇渲染模式        UIImageView *imageView1 = [[UIImageView alloc]initWithImage:[[UIImage imageNamed:@"AppIconImage"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];  //預設採用圖片的原始顏色來進行圖片渲染    imageView1.frame = CGRectMake(0, 50, imageView1.frame.size.width, imageView1.size.height);        UIImageView *imageView2 = [[UIImageView alloc]initWithImage:[[UIImage imageNamed:@"AppIconImage"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]];  //採用藍色作為渲染顏色,忽略原始圖片的顏色    imageView2.frame = CGRectMake(0, 150, imageView1.frame.size.width, imageView1.size.height);        [self.view addSubview:imageView];    [self.view addSubview:imageView1];    [self.view addSubview:imageView2];    }

 

 

//以下三個函數都用來處理絕對值的。只不過處理的類型不一樣。int abs(int i);                   // 處理int類型的取絕對值double fabs(double i); //處理double類型的取絕對值float fabsf(float i);           //處理float類型的取絕對值

 

iOS 部分API理解

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.