所以,當我定製我的按鈕,我把這樣一個背景圖片:爲什麼UIButton外觀變更披露?如何避免它?
- (void) styleUIButtons {
UIImage *buttonNormalBg = [[UIImage imageNamed:@"button_normal" ] stretchableImageWithLeftCapWidth:0 topCapHeight:0];
UIImage *buttonSelectedBgb = [[UIImage imageNamed:@"button_selected" ] stretchableImageWithLeftCapWidth:0 topCapHeight:0];
id appereance = [UIButton appearance];
[appereance setTintColor:self.mainNavigationBarTextColor];
[appereance setBackgroundImage:buttonNormalBg forState:UIControlStateNormal];
[appereance setBackgroundImage:buttonSelectedBgb forState:UIControlStateHighlighted];
}
但表的變化,一條線路披露指標可怕。爲什麼發生這種情況?我該如何避免它?我是否錯誤地自定義按鈕?
改變方法,但我不知道如何可以搞亂披露指標 – Necronet