MeterView icon indicating copy to clipboard operation
MeterView copied to clipboard

Rescale view issue

Open grijon opened this issue 11 years ago • 0 comments

Grate work! Thanks for your control.

I have found an issue - a MeterNeedle not rescaled when main MeterView has been rescaled.

I solved with next fix.

in method drawLayer: inContext: for MeterView change

  • CGFloat endX = (1 + self.length) * centerX;
  • CGFloat endX = (1 + self.length) * fmin(centerX,centerY);

and add next method into MeterView

-(void)setFrame:(CGRect)frame { [super setFrame:frame]; needleLayer.bounds = CGRectMake(0.0f, 0.0f, frame.size.width, frame.size.height); needleLayer.position = CGPointMake(needleLayer.bounds.size.width / 2.0, needleLayer.bounds.size.height / 2.0); }

grijon avatar Mar 28 '14 12:03 grijon