diff options
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 0b022ee..46d5ddf 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -7504,7 +7504,13 @@ freeing the view controllers on tab change */ search_ = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, [[self view] bounds].size.width, 44.0f)]; [search_ layoutSubviews]; [search_ setPlaceholder:UCLocalize("SEARCH_EX")]; - UITextField *textField = [search_ searchField]; + + UITextField *textField; + if ([search_ respondsToSelector:@selector(searchField)]) + textField = [search_ searchField]; + else + textField = MSHookIvar<UITextField *>(search_, "_searchField"); + [textField setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin]; [search_ setDelegate:self]; [textField setEnablesReturnKeyAutomatically:NO]; |