1.設定UIbutton的image時,白色的圖檔變成了藍色
原圖:
ios7中:
ios6.1中:
代碼:
UIButton* button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(37, y+100, 116, 34);
[button setImage:[UIImage imageNamed:@"login_but_bg_h.png"] forState:UIControlStateNormal];
[button addTarget:self action:@selector(showRegisterView:) forControlEvents:UIControlEventTouchUpInside];
[contentView addSubview:button];
原因:
UIButtonTypeRoundedRect樣式搞的鬼,
UIButtonTypeCustom樣式正常顯示