Giter Site home page Giter Site logo

Comments (5)

cssmhyl avatar cssmhyl commented on June 3, 2024

I creat the cell with xib and set color in awakeFromNib

from dacircularprogress.

danielamitay avatar danielamitay commented on June 3, 2024

Would you be able to provide a simple example application replicating the issue?

from dacircularprogress.

vanderneut avatar vanderneut commented on June 3, 2024

FWIW:

I am using DACircularProgress in custom table cells coming from a nib and I have no problem setting the trackTintColor and progressTintColor properties. In fact, I'm using different colors in different rows of the same table and it works perfectly.

In my code I am essentially setting the colors in the -tableView:cellForRowAtIndexPath: UITableView delegate method. In more detail: I am setting a data model on the table cell in that method, and the setter for that model in the custom table cell class triggers the following calls to set the progress indicator colors and some other properties:

self.circularProgressView.roundedCorners = NO;
self.circularProgressView.trackTintColor = [UIColor colorWithRed:200/255.0f green:200/255.0f blue:200/255.0f alpha:1];  // very light gray
self.circularProgressView.progressTintColor = [self getModeColor];
self.circularProgressView.thicknessRatio = 0.2f;

The -getModeColor is a custom method returning different UIColor* based on some conditions.

Hope this helps.

Erik

from dacircularprogress.

cssmhyl avatar cssmhyl commented on June 3, 2024

The sample project is:
https://github.com/cssmhyl/TestForCircularProgress

The bug only appears on iOS7.(iOS8 is ok)
![circalur_iphone5_ios8](https://cloud.githubu
![circalur_iphone4s_ios7]%28https://cloud.githubusercontent.com/assets/6084247/7488886/c7051816-f402-11e4-8ce6-2a12de2b32f2.PNG%29
sercontent.com/assets/6084247/7488884/bcb5de68-f402-11e4-9cd7-d1ab9aa3b44f.png)

from dacircularprogress.

cuongtv51 avatar cuongtv51 commented on June 3, 2024

Hi cssmhy,

as @vanderneut has explain, you should set color in '-tableView:cellForRowAtIndexPath:' ,
I see in sample project of you, you set color in function 'awakeFromNib' , and table view caching view for faster display, so that cause problem.

Hope this helps.

from dacircularprogress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.