Closed bguidolim closed 9 years ago
You are absolutely right.
Another suggestion: In initWithFrame:
in RJCircularLoaderView
you can use the tintColor to initialise the strokeColor:
_circlePathLayer.strokeColor = self.tintColor.CGColor;
Then, there's no need for startLoaderWithColor:
. Just startLoader
and to change the color, users of the library can change the tintColor
, which we can document in the README.
I don't think so, which color will be default by this way? We don't need to set a color in initWithFrame:
because tintColorDidChange
handles it for us.
About startLoaderWithColor:
, I consider a "nice to have".
The default iOS tintColor
is a shade of dark blue, which works well IMO. Let's do this. Set strokeColor
to be default tintColor
in init
, and then change the methods below a little in this way:
- (void)startLoader
{
RJCircularLoaderView *loaderView = self.rj_circularLoaderView;
loaderView.frame = self.bounds;
[self addSubview:loaderView];
loaderView.progress = 0;
}
- (void)startLoaderWithTintColor:(UIColor *)color
{
[self startLoader];
self.rj_circularLoaderView.tintColor = color;
}
Thanks a lot @bguidolim!
You're welcome!
Could you create a tag 0.2.0 and update Podspec in the cocoapods specs repo? I'm using in a project already :)
On it!
Should be available now
Rounak
On Tue, Feb 24, 2015 at 11:10 PM, Bruno Guidolim notifications@github.com wrote:
You're welcome!
Could you create a tag 0.2.0 and update Podspec in the cocoapods specs repo? I'm using in a project already :)
Reply to this email directly or view it on GitHub https://github.com/rounak/RJImageLoader/pull/3#issuecomment-75805121.
Many thanks ;)
On Tue Feb 24 2015 at 3:18:47 PM Rounak notifications@github.com wrote:
Should be available now
Rounak
On Tue, Feb 24, 2015 at 11:10 PM, Bruno Guidolim <notifications@github.com
wrote:
You're welcome!
Could you create a tag 0.2.0 and update Podspec in the cocoapods specs repo? I'm using in a project already :)
Reply to this email directly or view it on GitHub https://github.com/rounak/RJImageLoader/pull/3#issuecomment-75805121.
— Reply to this email directly or view it on GitHub https://github.com/rounak/RJImageLoader/pull/3#issuecomment-75813654.
UIView has a tintColor property already right? We can use that along with
tintColorDidChange