-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFSTableViewController.m
69 lines (43 loc) · 1.4 KB
/
FSTableViewController.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//
// FSTableViewController.m
//
//
// Created by Elliot Neal on 19/01/2011.
// Copyright 2011 emdentec. All rights reserved.
//
#import "FSTableViewController.h"
@implementation FSTableViewController
@synthesize tableView = tableView_;
@synthesize clearsSelectionOnViewWillAppear = clearsSelectionOnViewWillAppear_;
#pragma mark -
#pragma mark View Lifecycle
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
if (self.clearsSelectionOnViewWillAppear)
[self.tableView deselectRowAtIndexPath:[self.tableView indexPathForSelectedRow] animated:animated];
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[self.tableView flashScrollIndicators];
}
- (void)viewDidUnload {
[super viewDidUnload];
self.tableView = nil;
}
#pragma mark -
#pragma mark UIViewController Overrides
- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
[super setEditing:editing animated:animated];
[self.tableView setEditing:editing animated:animated];
}
#pragma mark -
#pragma mark UITableViewDataSource Blank Signatures
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 0; }
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { return nil; }
#pragma mark -
#pragma mark Memory Management
- (void)dealloc {
self.tableView = nil;
[super dealloc];
}
@end