Permalink
Browse files

Always use same frame/autoresizingMask for placeholderView than origi…

…nal imageView (EGO)
  • Loading branch information...
1 parent 2f783dc commit 9828fc12557159f13cea6265ff2cd81400d5555c @myell0w myell0w committed Jul 19, 2011
Showing with 6 additions and 2 deletions.
  1. +6 −2 ExternalFrameworks/EGOImageLoader/EGOImageView/EGOImageView.m
@@ -124,9 +124,13 @@ - (void)dealloc {
- (void)showPlaceholderView {
if (self.placeholderView == nil) {
self.placeholderView = [[[UIImageView alloc] initWithFrame:self.bounds] autorelease];
- self.placeholderView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
- self.placeholderView.image = self.placeholderImage;
+ }
+
+ self.placeholderView.frame = self.bounds;
+ self.placeholderView.autoresizingMask = self.autoresizingMask;
+ self.placeholderView.image = self.placeholderImage;
+ if (self.placeholderView.superview == nil) {
[self addSubview:self.placeholderView];
}
}

0 comments on commit 9828fc1

Please sign in to comment.