iphone - Scroll view - How to keep the objects in the view -


I have a scroll view that has many textfields and then some UISwitches and UIButtons followed by more textfield .

I found the textFieldDidBeginEditing event and that view is used to view textfield . But I have not found anything similar to other items like UISwitch and UIButton .

Is there something that does that? Below is the code that I use for 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]; }    

You can use the UIControlEventValueChanged event. [SWITCH CONTROL ADTarget: Self-Proceeding: @Selector (ScrollViewConverterOfficeFree :) for Control Events: UIControlEventWalls];

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

ruby on rails - Convert a Activerecord result with has_one associations into a single hash per record -

javascript - Read complete data from stream from onMessage -