Permalink
Browse files

- added scrollToRowAtIndexPath wrapper

  • Loading branch information...
1 parent d15305a commit 6dc7ad66adb1b2a25addb8766c0c46fd3a320b99 @olarivain olarivain committed Oct 4, 2012
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:Frank.xcodeproj">
+ </FileRef>
+</Workspace>
@@ -13,4 +13,10 @@
- (void) scrollToTop;
- (void) setContentOffsetX: (NSInteger) x y: (NSInteger) y;
+@end
+
+@interface UITableView (FrankScrolling)
+
+- (void) scrollToRow: (NSInteger) row inSection: (NSInteger) section;
+
@end
@@ -21,3 +21,15 @@ - (void) setContentOffsetX: (NSInteger) x
}
@end
+
+
+@implementation UITableView (FrankScrolling)
+
+- (void) scrollToRow: (NSInteger) row inSection: (NSInteger) section {
+ NSIndexPath *indexPath = [NSIndexPath indexPathForRow: row inSection: section];
+ [self scrollToRowAtIndexPath: indexPath
+ atScrollPosition: UITableViewScrollPositionNone
+ animated: NO];
+}
+
+@end

0 comments on commit 6dc7ad6

Please sign in to comment.