1. skipday's Avatar
    Hi All,

    I was searching a solution for a UITextField in row under UITableView.

    Here is what I want to do. UITextField field should be scroll to top when user clicks on it.

    I search Google for the issue and did not find any solution.

    Can somebody help me how can I implement scrolling event when particular row is selected?

    Thank you in advanced.
    03-15-2011 05:08 AM
  2. starwarrior's Avatar
    A lot to discuss when creating an app. The best suggestion I have is the get the entire picture from front to back and nothing left out on how to. Should visit This site click here. I'm new to iphone and have no programming experience and this system helped me out a bunch
    03-15-2011 11:32 AM
  3. baharharre's Avatar
    There is no direct event or class for this action. You need to add some custom code as per below guideline.

    1) First of all set tag of UITextField as indexpath.row.
    2) In UITableView delegate enable or add method "- (BOOL)textFieldShouldBeginEditing: (UITextField *)textField"
    3) Pass tag value of UITextField to below method.
    4) - (void) setRowOnTop: (NSNumber*)numRow{
    NSInteger iRow = [numRow intValue];
    CGRect rowFrame = [tiTableView rectForSection:0];
    NSIndexPath *indexPath = [[tiTableView indexPathsForRowsInRect:rowFrame] objectAtIndex:iRow];
    [tiTableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];
    Last edited by baharharre; 04-21-2011 at 06:38 AM.
    03-21-2011 05:20 AM
  4. bartekhugo's Avatar
    check also ELCTextFieldCell on icodeblog
    if i remeber correctly there were also some in thre20 framework
    03-21-2011 05:43 AM
  5. skipday's Avatar
    Thanks all for reply...
    03-31-2011 05:58 AM
  6. twild's Avatar
    Also, might want to check out iPhone Dev SDK

    Lots of help there.
    03-31-2011 08:29 AM