//
//  ViewController.m
//  ex_UIImageView_tintColor
//
//  Created by yoshiyuki oshige on 2013/10/01.
//  Copyright (c) 2013年 yoshiyuki. All rights reserved.
//
#import "ViewController.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet UIImageView *tombo1;
@property (weak, nonatomic) IBOutlet UIImageView *tombo2;
@property (weak, nonatomic) IBOutlet UIImageView *tombo3;
@property (weak, nonatomic) IBOutlet UIImageView *frog;
@property (weak, nonatomic) IBOutlet UIImageView *flower;
@property (weak, nonatomic) IBOutlet UIImageView *car;
@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	
    // 同じイメージを色違いで指定
    _tombo1.image = [_tombo1.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
    _tombo2.image = [_tombo2.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
    _tombo1.tintColor = [UIColor colorWithRed:0.000 green:0.8 blue:0.6 alpha:1.000];
    _tombo2.tintColor = [UIColor colorWithRed:0.000 green:0.3 blue:0.5 alpha:1.000];
    
    // 省略すると親ビューのTintColorで表示される
    _tombo3.image = [_tombo3.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
    _frog.image = [_frog.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
    
    // redColorを指定 アルファチャネルで透けている部分がある
    _flower.image = [_flower.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
    _car.image = [_car.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
    _flower.tintColor = [UIColor redColor];
    _car.tintColor = [UIColor redColor];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
