Skip to content

Commit 9d035cc

Browse files
committed
Fixes a toolbar issue
1 parent c908493 commit 9d035cc

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
Binary file not shown.

KeyboardTextFieldDemo/IQKeyBoardManager/IQToolbar.m

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,13 @@ -(CGSize)sizeThatFits:(CGSize)size
7070
{
7171
CGSize sizeThatFit = [super sizeThatFits:size];
7272

73-
//Issue #52 fix
74-
sizeThatFit.width = [[[self viewController] view] width];
73+
UIView *view = [[self viewController] view];
74+
75+
if (view)
76+
{
77+
//Issue #52 fix
78+
sizeThatFit.width = [[[self viewController] view] width];
79+
}
7580

7681
return sizeThatFit;
7782
}

0 commit comments

Comments
 (0)