iphone - Scroll view - How to keep the objects in the view -
I have a scroll view that has many I found the Is there something that does that? Below is the code that I use for You can use the UIControlEventValueChanged event. [SWITCH CONTROL ADTarget: Self-Proceeding: @Selector (ScrollViewConverterOfficeFree :) for Control Events: UIControlEventWalls]; textfields and then some UISwitches and UIButtons followed by more textfield . textFieldDidBeginEditing event and that view is used to view textfield . But I have not found anything similar to other items like UISwitch and UIButton . textfields
- (zero) textFieldDidBeginEditing: (UITextField *) textField {[auto-scrollwitocent offscreen: textField]; } - (zero) scrollview cursoroffscreen: (UIView *) theView {CGFloat viewCenterY = theView.center.y; CGRT applicationframe = [[USScreen main screen] applicationframe]; CGFlot availableHight = applicationFrameSizeHight - _KeyboardHigh; // Remove the area covered by keyboard CGFloat y = viewCenterY - Available Hits / 2.0; If (y & lt; 0) {y = 0; } ScrollView.contentSize = CGSizeMake (applicationFrame.size.width, applicationFrame.size.height + _keyboardHeight); [ScrollView Set Content Offset: CGPointMake (0, Y) Animated: Yes]; }
Comments
Post a Comment