Need iphone apps Development Help

skipday

New member
Mar 14, 2011
3
0
0
Visit site
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.
 

starwarrior

Member
Mar 15, 2011
9
0
0
Visit site
Should invest in this

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
 

baharharre

Well-known member
Mar 16, 2011
85
4
0
Visit site
RE : iphone apps Development Help

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:

Latest posts

Trending Posts

Members online

Forum statistics

Threads
260,349
Messages
1,766,517
Members
441,240
Latest member
smitty22d2