Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)viewDidLoad {
- [super viewDidLoad];
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(keyboardDidShow:)
- name:UIKeyboardDidShowNotification
- object:nil];
- }
- - (void)findCandidateBar:(NSArray *)subviews {
- for (UIView *view in subviews) {
- if ([[view description] hasPrefix:@"<UIKeyboardCandidateBar"]) {
- _candidateBarHeight = view.frame.size.height;
- } else {
- [self findCandidateBar:[view subviews]];
- }
- }
- }
- - (void)keyboardDidShow:(NSNotification *)notification {
- _candidateBarHeight = 0;
- [self findCandidateBar:[[UIApplication sharedApplication] windows]];
- // ...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement