fixing bug with splitview

This commit is contained in:
Roy Yang 2012-07-11 20:51:36 -07:00
parent 53e1a1d3cb
commit ee00402c7f

View file

@ -150,6 +150,10 @@
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
/* When MGSplitViewController rotates, it causes a resize of our view; we need to resize our UIBarButtonControls or they will be 0-width */ /* When MGSplitViewController rotates, it causes a resize of our view; we need to resize our UIBarButtonControls or they will be 0-width */
[self.navigationItem.titleView sizeToFit]; [self.navigationItem.titleView sizeToFit];
UIButton *avatar = (UIButton *)self.navigationItem.leftBarButtonItem.customView;
CGRect buttonFrame = avatar.frame;
buttonFrame.size = CGSizeMake(32, 32);
avatar.frame = buttonFrame;
} }
- (void)didReceiveMemoryWarning { - (void)didReceiveMemoryWarning {