summaryrefslogtreecommitdiff
path: root/UICaboodle/ResetView.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2008-05-06 11:46:02 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2010-09-30 07:07:53 +0000
commitab398adfe5c3cf3ccf350921b339fef9e1cc250c (patch)
tree76fa31ca0d4118110a6bfd0a2276650109f57215 /UICaboodle/ResetView.mm
parent308c03802400d5679ec355e577f09bd0e86bfcd9 (diff)
Further factorization, file content list, checkbox clarication, advanced search teaser, and fully awesome keyboard control.
Diffstat (limited to 'UICaboodle/ResetView.mm')
-rw-r--r--UICaboodle/ResetView.mm42
1 files changed, 42 insertions, 0 deletions
diff --git a/UICaboodle/ResetView.mm b/UICaboodle/ResetView.mm
new file mode 100644
index 0000000..8c0041a
--- /dev/null
+++ b/UICaboodle/ResetView.mm
@@ -0,0 +1,42 @@
+#import "ResetView.h"
+
+#include <objc/objc.h>
+#include <objc/runtime.h>
+
+@implementation UIView (RVBook)
+
+- (void) resetViewAnimated:(BOOL)animated {
+ fprintf(stderr, "%s\n", class_getName(self->isa));
+ _assert(false);
+}
+
+- (void) clearView {
+ fprintf(stderr, "%s\n", class_getName(self->isa));
+ _assert(false);
+}
+
+@end
+
+@implementation UITable (RVBook)
+
+- (void) resetViewAnimated:(BOOL)animated {
+ [self selectRow:-1 byExtendingSelection:NO withFade:animated];
+}
+
+- (void) clearView {
+ [self clearAllData];
+}
+
+@end
+
+@implementation UISectionList (RVBook)
+
+- (void) resetViewAnimated:(BOOL)animated {
+ [[self table] resetViewAnimated:animated];
+}
+
+- (void) clearView {
+ [[self table] clearView];
+}
+
+@end