0
我有一個自定義滑動條,當我前後滑動時,軌跡圖像似乎左右移動一點。任何人都知道爲什麼會這樣?UISliderbar在移動軌跡時移動
UIImage *stetchLeftTrack = [[UIImage imageNamed:highBar] stretchableImageWithLeftCapWidth:capLeft topCapHeight:0.0];
UIImage *stetchRightTrack = [[UIImage imageNamed:grooveBar] stretchableImageWithLeftCapWidth:capRight topCapHeight:0.0];
[customSlider setThumbImage: [UIImage imageNamed:thb] forState:UIControlStateNormal];
[customSlider setThumbImage: [UIImage imageNamed:thbH] forState:UIControlStateHighlighted];
[customSlider setMinimumTrackImage:stetchLeftTrack forState:UIControlStateNormal];
[customSlider setMaximumTrackImage:stetchRightTrack forState:UIControlStateNormal];
什麼是capleft和capright? – Sneakyness 2009-12-17 21:59:33
40和1.實際上圖像的大小很重要嗎?對於圖像上限,這會是一個很好的價值嗎? – wolffang 2009-12-17 22:53:36