Skip to content

Commit

Permalink
Use own bounds when used as top view
Browse files Browse the repository at this point in the history
  • Loading branch information
xiao99xiao committed Mar 16, 2015
1 parent 62a0cc9 commit a6e5c23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ACEDrawingView/ACEDrawingView.m
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ - (void)loadImage:(UIImage *)image
{
self.image = image;

self.frame = [self rectForAspectFitSize:image.size inRect:self.superview.bounds];
self.frame = [self rectForAspectFitSize:image.size inRect:self.superview?self.superview.bounds:self.bounds];
self.center = CGPointMake(CGRectGetMidX(self.superview.bounds), CGRectGetMidY(self.superview.bounds));

//save the loaded image to persist after an undo step
Expand Down

0 comments on commit a6e5c23

Please sign in to comment.