要想讓uibutton點擊不變灰 初始化的時候就不能 UIButton *button = [[UIButton alloc]init]; 初始化的時候醬紫,可以保證button點擊時不變灰 UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; 如果只做了上面的button不會變灰,但是圖片還會變灰,下面的可以保證圖片不變灰 buttomButton.adjustsImageWhenHighlighted = NO;
要想讓uibutton點擊不變灰 初始化的時候就不能 UIButton *button = [[UIButton alloc]init]; 初始化的時候醬紫,可以保證button點擊時不變灰 UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; 如果只做了上面的button不會變灰,但是圖片還會變灰,下面的可以保證圖片不變灰 buttomButton.adjustsImageWhenHighlighted = NO;
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。