how can i import a custom IB'UIView such as custom UITableViewCell in wax

18 views
Skip to first unread message

Amor Yin

unread,
Apr 1, 2016, 9:19:45 AM4/1/16
to iPhone Wax
how can i import a custom IB'UIView such as custom UITableViewCell in wax?

like this in oc
@interface CustomCell : UITableViewCell
@property (nonatomic,weak)IBOurlet UILabel *titleLabel;
@end


#import "CustomCell.h"

@implemention CustomCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(nullable NSString *)reuseIdentifier
{
   
UITableViewCell *cell = (UITableViewCell*)[[UIBundle mainBundle] loadNibNamed:@"CustomCell" owner:self options:nil][0];
   
return cell;
}


- (void)awakeFromNib {


    // Initialization code


}



@end


in UITableViewController.m

i can use

CustomCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@""];
cell.titleLabel.text = @"..."

or
CustomCell *cell =    (UITableViewCell*)[[UIBundle mainBundle] loadNibNamed:@"CustomCell" owner:self options:nil][0];
cell
.titleLabel.text = @"..."


but in wax lua, how can use as  except create CustomCell.lua

Reply all
Reply to author
Forward
0 new messages