- Get link
- X
- Other Apps
- Get link
- X
- Other Apps
Create a new file with xib,
-> MyCustomCellTableViewCell.h
#import <UIKit/UIKit.h>
@interface MyCustomCellTableViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIImageView *img;
@property (weak, nonatomic) IBOutlet UILabel *lbl;
@property (weak, nonatomic) IBOutlet UIButton *btnDownload;
@end
Now goto TableView,
-> In Newsletter.m,
#import "MyCustomCellTableViewCell.h"
In viewDidLoad,
UINib *nib=[UINib nibWithNibName:@"MyCustomCellTableViewCell" bundle:nil];
if(nib)
{
[_tbl_Newsletter registerNib:nib forCellReuseIdentifier:cell_id];
}
In
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath{
MyCustomCellTableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:cell_id];
cell.lbl.text=@“”;
}
Comments
Post a Comment