How to hide my tableView which is declared in another class..
Here is my code snippet,
CRStoreView.h
@interface CRStoreView : UIView <UITableViewDelegate, UITableViewDataSource>{
....
}
@property (strong, nonatomic) IBOutlet UITableView *tblStore;
and i want to hide this tblStore in my new class(CRNextView.m)..
I tried this but table is not getting hide,
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
NSLog(@"touchesBegan");
CRStoreView *Obj = [[CRStoreView alloc] init];
[Obj.tblStore setHidden:YES];
}
How to Solve it ?
One method is to use delegates. Make
CRStoreViewa delegate of theCRNextViewand call thesetHiddenmethod from theCRNextViewon the delegate. Or you could pass the current instance of theCRStoreViewtoCRNextViewand access the tableView object.