0
你好,我有一個自定義圖像,以取代UISLider defult按鈕圖像,所有工作良好的圖像顯示,它不剪輯。問題是,當我使用滑塊上下移動圖像消失,並且有些時候不再出現。有人可以修復嗎?自定義UISlider圖像消失了嗎?
CGRect rect = CGRectMake(16.0, 390.0, 297.0, 35.0);
slider.frame = rect;
UIImage* thumbImage = [UIImage imageNamed:@"thumb.png"];
[slider setThumbImage:thumbImage forState:UIControlStateNormal];
UIImage* leftImage = [UIImage imageNamed:@"SliderLeft.png"];
[slider setMinimumTrackImage:leftImage forState:UIControlStateNormal];
UIImage* rightImage = [UIImage imageNamed:@"SliderRight.png"];
[slider setMaximumTrackImage:rightImage forState:UIControlStateNormal];
你可以發佈一個代碼示例? – 2010-04-14 21:03:27