Skip to content

Commit

Permalink
Revert #52 fix
Browse files Browse the repository at this point in the history
Former-commit-id: ea5e50e
  • Loading branch information
hackiftekhar committed Jul 18, 2014
1 parent 67aaa1c commit 5e01d51
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 16 deletions.
28 changes: 14 additions & 14 deletions KeyboardTextFieldDemo/IQKeyBoardManager/IQToolbar.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,20 @@ - (id)initWithCoder:(NSCoder *)coder
}


-(CGSize)sizeThatFits:(CGSize)size
{
CGSize sizeThatFit = [super sizeThatFits:size];
UIView *view = [[self viewController] view];

if (view)
{
//Issue #52 fix
sizeThatFit.width = [[[self viewController] view] width];
}

return sizeThatFit;
}
//-(CGSize)sizeThatFits:(CGSize)size
//{
// CGSize sizeThatFit = [super sizeThatFits:size];
//
// UIView *view = [[self viewController] view];
//
// if (view)
// {
// //Issue #52 fix
// sizeThatFit.width = [view width];
// }
//
// return sizeThatFit;
//}

//To resize IQToolbar on device rotation.
- (void) layoutSubviews
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6b5450e714661abac1519a6e627de7bdaaaceda9
dc17d17702d6f599f6296770f2e29af88b9f3e9e
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5cf15457610981c789f6195d7a2f3ce29fcf7022
383f803dc0938d47983db384de9c523ef7ee9f41
19 changes: 19 additions & 0 deletions KeyboardTextFieldDemo/KeyboardTextFieldDemo/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,25 @@ -(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)
}
}

-(BOOL)shouldAutorotate
{
return NO;
}

-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
return (toInterfaceOrientation == UIInterfaceOrientationPortrait);
}

-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait;
}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationPortrait;
}

@end

0 comments on commit 5e01d51

Please sign in to comment.