ios7 - UIProgressView custom track and progress images in iOS 7.1 -


ios 7.1 seems have broken custom image properties in uiprogressview. code used customize progress views yields default appearance.

i set sample project in viewdidload:

self.progressview.frame = cgrectmake(self.progressview.frame.origin.x, self.progressview.frame.origin.y, self.progressview.frame.size.width, 9); uiimage *img = [uiimage imagenamed:@"progress_bar_fill.png"]; img = [img resizableimagewithcapinsets:uiedgeinsetsmake(0, 4, 0, 4)]; self.progressview.progressimage = img;  img = [uiimage imagenamed:@"progress_bar_empty.png"]; img = [img resizableimagewithcapinsets:uiedgeinsetsmake(0, 4, 0, 4)]; self.progressview.trackimage = img; 

i still default appearance. i've stepped through , verified img non-nil expected. what's going on?

update: there openradar this, , i've filed radar of own complete sample project.

update 2: noted axy below, have add jeprogressview work correctly:

_progressbar.tintcolor = [uicolor clearcolor]; 

this annoying. didn't find way fix without subclassing uiprogressview.

anyway here's how fixed this: https://gist.github.com/johnestropia/9482567

you have change occurrences of uiprogressview jeprogressview, including in nibs , storyboards.

basically, you'd need force assigning images directly uiprogressview's children uiimageviews.

the subclass needed override layoutsubviews, adjust heights of imageviews according image sizes.


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -