]> git.saurik.com Git - cydia.git/blob - UICaboodle/ResetView.mm
We don't want a compile-time flag for RotationEnabled: we want it to work that way...
[cydia.git] / UICaboodle / ResetView.mm
1 #import "ResetView.h"
2
3 #include <objc/objc.h>
4 #include <objc/runtime.h>
5
6 #include <errno.h>
7
8 #include <cstdio>
9 #include <cstdlib>
10
11 @implementation UIView (RVBook)
12
13 - (void) resetViewAnimated:(BOOL)animated {
14 fprintf(stderr, "%s\n", class_getName(self->isa));
15 _assert(false);
16 }
17
18 - (void) clearView {
19 fprintf(stderr, "%s\n", class_getName(self->isa));
20 _assert(false);
21 }
22
23 @end
24
25 @implementation UITableView (RVBook)
26
27 - (void) resetViewAnimated:(BOOL)animated {
28 //[self selectRowAtIndexPath:nil animated:animated scrollPosition:UITableViewScrollPositionNone];
29 if (NSIndexPath *path = [self indexPathForSelectedRow])
30 [self deselectRowAtIndexPath:path animated:animated];
31 }
32
33 - (void) clearView {
34 //XXX:[[self table] clearView];
35 }
36
37 @end