Skip to content

Commit

Permalink
Should resize dismissButton as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
lexrus committed Aug 24, 2012
1 parent 4789362 commit 21a622e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/UIViewController+KNSemiModal.m
Expand Up @@ -148,8 +148,13 @@ - (void)resizeSemiView:(CGSize)newSize {
mf.size.width = newSize.width;
mf.size.height = newSize.height;
mf.origin.y = target.frame.size.height - mf.size.height;
UIView * overlay = [target.subviews objectAtIndex:target.subviews.count-2];
UIButton * button = [[overlay subviews] objectAtIndex:1];
CGRect bf = button.frame;
bf.size.height = overlay.frame.size.height - newSize.height;
[UIView animateWithDuration:kSemiModalAnimationDuration animations:^{
modal.frame = mf;
button.frame = bf;
}];
}

Expand Down

0 comments on commit 21a622e

Please sign in to comment.