Closed odanu closed 11 years ago
It's definitely implemented!
@odanu : is your problem solved ? I use this code. Here I am drawing table view from code, and it works. In .m File
@interface MyViewControllerTVC ()
@property (nonatomic, strong) UITableView *tableView;
@end .. ..
(void)viewDidLoad {
CGRect frame = self.view.bounds;
frame.origin.y = bgNavigationBarView.frame.size.height;
frame.size.height = frame.size.height - frame.origin.y;
_tableView = [[TPKeyboardAvoidingTableView alloc] initWithFrame:frame style:UITableViewStyleGrouped];
_tableView.delegate = self;
_tableView.dataSource = self;
_tableView.frame = frame;
_tableView.backgroundColor = [UIColor clearColor];
_tableView.backgroundView = nil;
[self.view addSubview:_tableView];
}
Then use regular table view delegates like
Done forget to do this in your .h file
@interface MyViewControllerTVC : UIViewController <UITableViewDataSource, UITableViewDelegate>
Sorry, I can't test it now, but I managed to get stuck in a moment of time, when I wanted to [[TPKeyboardAvoidingTableView alloc] initWithFrame:frame style:UITableViewStyleGrouped]; I don't even remember the problems which occured. It might be that the tableview did not scroll on keyboard appearance. Maybe because I don't use the last version of the classes. On the next use, I promise you to update the sources and test the case.
Hi,
I have recently tried to instantiate TPKeyboardAvoidingTableView with standard UITableView init method - (id)initWithFrame:(CGRect)frame style:(UITableViewStyle)style and found it was not working. After a short debug I found that the method is not implemented.
It's a easy one:)