-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Mod Med Animation #2
base: master
Are you sure you want to change the base?
Conversation
@implementation MMLogoAnimatedView | ||
|
||
- (void)willMoveToSuperview:(UIView *)newSuperview { | ||
if (!newSuperview) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should do
if (newSuperview == nil) {
}
- (void)setFrame:(CGRect)frame { | ||
if(!CGRectEqualToRect(frame, super.frame)) { | ||
[super setFrame:frame]; | ||
if(self.superview) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should do
if (self.superview != nil) {
}
if(!CGRectEqualToRect(frame, super.frame)) { | ||
[super setFrame:frame]; | ||
if(self.superview) { | ||
self.offsetToCenter = self.diameter < self.superview.bounds.size.width ? (self.superview.bounds.size.width - self.diameter) / 2 : 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can make this more debug friendly by doing:
CGFloat superviewWidth = CGRectGetWidth(self.superview.bounds);
BOOL diameterLessThatSuperviewWidth = self.diameter < superviewWidth;
self.offsetToCenter = diameterLessThatSuperviewWidth ? (superviewWidth - self.diameter) / 2 : 0;
} | ||
|
||
- (CAShapeLayer *)createRingLayer { | ||
if (!self.ringLayer) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
} | ||
|
||
- (CAShapeLayer *)createHeartbeatLayer { | ||
if (!self.heartbeatLayer) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
No description provided.