iphone - UIScrollView scroll problem -


I have a UIScrollView and there is a text field at the bottom of the screen when I select the textfield then the keyboard text from the file Is displayed above i UIView in the UIScrollView is not enough to scroll enough and some space is free for the keyboard. That's why I have tried to expand the UIUU programmatically. What does this have to me:

Prefix: (BOOL) textFieldShouldBeginEditing: (UITextField *) textField {UIScrollView * scrollView = (UIScrollView *) [[see itself] viewWithTag: 2]; UIView * contentview = [[see for yourself] View DetailsTags: 3]; CGRect Rect = contentview.frame; Rect.size.height = 650; Contentview.frame = rect; [ScrollView Set Content Size: contentview.frame.size]; // first try rect.origin.y = 450; [ScrollView scrollRectToVisible: animated rect: yes]; // Second attempt CGPoint point = CGPointMake (0, 450); [ScrollView Set Content Offset: Point Animated: Yes]; Yes come back }

Thanks.

You can register to get your view controller and then view controller's view frame on the keyboard Move above the size, which is provided in the notification.

  CGFF frame = self.view.frame; Frame.origin.y - = keyboard.size.height; Self.view.frame = frames;  

Reverse for UIKeyboardWillHideNotification


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -