iphone - UITableView's contentOffset keep changing itself -


Renewed : Scroll down for updates.

I have a UITableView that contains some UITextView (S) cells when users start editing text and keyboard, then I resize the tableView's frame and scrollToRowAtIndexPath method to scroll the editing cell: :: Visible with UITableView All this work will not fully start typing until actually typing. The problem is that every time the key of the keyboard is killed, the value of the content of the UITableView changes its own property.

I try to log it in for each key stroke

  NSLog @ "% 1.2F,% 1.2F,% 1.2F,% 1.2F" , Self Table Content Size. Width, Stableable Content Size. HEIGHT, STATABLE CONSANT OFFSET.X, STATABIL. Contract Offset );   

And this is the result

  2011-03-17 00: 13: 05.380 ... [6243: 207] 320.00, 355.00, 0.00, 8.00 2011-03-17 00: 13: 06.138 ... [6243: 207] 320.00, 355.00, 0.00, 13.00 2011-03-17 00: 13: 06.848 ... [6243: 207] 320.00, 355.00, 0.00, 8.00 2011-03-17 00: 13: 07.578 ... [6243: 207] 320.00, 355.00, 0.00, 13.00 2011-03-17 00: 13: 08.377 ... [6243: 207] 320.00, 355.00, 0.00, 8.00   

As you can see, content offset. You only keep changing all the time, and from this, the tableview jumps and comes down for each key stroke. There is no such place in my code that changes the content offset value of tableviews, or at least not explicitly. - (zero) KeyboardDidShow: (nsnification *) notification {/ p> If (keyboardAlreadyShow) // Returns from one text view to another Users jump; NSDictionary * userInfo = [Information User Inc.]; NSValue * aValue = [userInfo objectForaki: UIKeyboardFrameEndUserInfoKey]; CGRect KeyboardRect = [Avg CGRectValue]; KeyboardRect = [self.view Convert Office: see from the keyboard layout: zero]; CGFloat Keyboard Top = keyboardRect.origin.y; Cgtffreem = self.view.bounds; Newframe.origin.x = self.table.frame.origin.x; NewFrame.size.width = self.table.frame.size.width; NewFrame.size.height = keyboardTop; NSVLUE * animation update == [user information objectForaki: UIKeyboardAnimationDurationUserInfoKey]; NSTEInternet animation animation; [Get animation transfer value property: and animation transit]; [UIView Chet Realism: AnimationUpdate Animation: ^ {self.table.frame = newFrame; }]; NSINPSpath * Index [Table of the table: ForecastCell: Edit]; [Self-directed scrollToRowAtIndexPath: Index ScrollPosition: UITWebScrollPortionNonated Animated: Yes]; KeyboardEldsho = Yes; } - (zero) Keyboard DualHide: (NSNotification *) Notification {CGRect newFrame; Newfram.origin.y = self.table.frame.origin.y; Newframe.origin.x = self.table.frame.origin.x; NewFrame.size.width = self.table.frame.size.width; NewFrame.size.height = 430; NSDictionary * userInfo = [Information User Inc.]; NSVLUE * animation update == [user information objectForaki: UIKeyboardAnimationDurationUserInfoKey]; NSTEInternet animation animation; [Get animation transfer value property: and animation transit]; [UIView Chet Realism: AnimationUpdate Animation: ^ {self.table.frame = newFrame; }]; [Self-controlled scrollToRowAtIndexPath: [NSIndexPath indexPathForRow: 0 in attribute: 0] atScrollPosition: Animated UITableViewScrollPositionNone: Yes]; } - (zero) KeyboardDidHide: (nsnification *) Information {keyboardAlreadyShow = NO; }

Any help would really be appreciated thanks.

Renewed : Now I think I can reduce the problem in this specific line

  txtLatInteger.text = [NSString stringWithFormat: @ "... ...    

Which is a UITextView located in TableViewCell and will be updated each time another tableview view will change another textView. I can not comment on this line like inserting TableView UITableViewCell into UITableViewCell. This may cause a rant problem. Change the input field to UITextField Solve the car). But I have to do this I need some specific behavior from UITx. I am working with what I have when my keyboard appears, which is similar to your code. When I see my keyboard, I animate the resizing of my UITableView in the same way as my code. Your Keyboard Dashboard Notification And I almost like before functionality functionality

I do not see you jumping while typing the problem, so I am highlighting your problem, your keyboard does not have any accompanying keyboards or keyboardmedhead notifications. Is there a program called sink? I have noticed that this causes UTBLVs to behave strangely in the simulator.

Comments