TAGS :Viewed: 10 - Published at: a few seconds ago

[ How to reload JKExpandTableView? ]

I am using JKExpandTableView and I want to reload JKExpandTableview. Currently Im calling reloadData method on JKExpandTableView object but it will not call data source delegate method. Thanks.

My header file is like below:

#import "JKExpandTableView.h"

@interface IncidentsViewController : UIViewController <JKExpandTableViewDelegate, JKExpandTableViewDataSource>

@property(nonatomic,weak) IBOutlet JKExpandTableView * expandTableView;
@property(nonatomic,strong) NSMutableArray * dataModelArray;
-(void)refreshIncidentsModule;
@end

And my IncidentsController.m is:

- (void)viewDidLoad
{
  [super viewDidLoad];
    // Do any additional setup after loading the view
  [self initializeSampleDataModel];
  self.expandTableView.tableViewDelegate = self;
  self.expandTableView.dataSourceDelegate = self;
  [self deviceOrientationDidChangeNotification:nil];
}

-(void)refreshIncidentsModule
{
  [self initializeSampleDataModel];
  [self.expandTableView reloadData];
}

Answer 1


in your viewDidLoad method set delegate and datasource.something like followings:

- (void)viewDidLoad
{
    self.expandTableView.tableViewDelegate = self;
    self.expandTableView.dataSourceDelegate = self;
}