Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- added scrollToRowAtIndexPath wrapper

  • Loading branch information...
commit 6dc7ad66adb1b2a25addb8766c0c46fd3a320b99 1 parent d15305a
@olarivain olarivain authored
View
7 Frank.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:Frank.xcodeproj">
+ </FileRef>
+</Workspace>
View
6 src/UIScrollView+FrankScrolling.h
@@ -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
View
12 src/UIScrollView+FrankScrolling.m
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.