I am using custom " UISlider
" to show progress bar of MPMoviePlayer
. Its working fine in simulator
but when i run the same on device it does not apply the image which i provide instead it shows the default behaviour I am using the following code:
UISlider *slider;
[slider setMinimumTrackImage:[UIImage imageNamed:@"progress_bar_active.png"] forState:UIControlStateHighlighted];
[slider setMaximumTrackImage:[UIImage imageNamed:@"progress_bar_background_upper.png"] forState:UIControlStateNormal];
[slider setThumbImage:[UIImage imageNamed:@"thumb.png"] forState:UIControlStateNormal];
It is just really strange.My device is iPad 2(7.0.6)
, iPad3(7.0.4)
and Xcode Version is 5.1.1
.
Thanks in Advance.
尝试将状态UIControlStateNormal
添加到setMinimumTrackImage
和setMaximumTrackImage
[slider setMaximumTrackImage:[UIImage imageNamed:@"progress_bar_background_upper.png"] forState:UIControlStateNormal];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.