I have the following class:
@interface DiscountDetailViewController : UIViewController {
UILabel * titleLabel;
UILabel * offerLabel;
}
@property (nonatomic, retain) IBOutlet UILabel * titleLabel;
@property (nonatomic, retain) IBOutlet UILabel * offerLabel;
@end
and I tried to do the following in the previous view:
discount = [[DiscountDetailViewController alloc] initWithNibName:@"DiscountDetailViewController" bundle:nil];
discount.titleLabel.text = temp.vendor;
discount.offerLabel.text = temp.description;
[self.navigationController pushViewController:discount animated:YES];
The issue is that, discount.titleLabel.text when printed is always null... I think it's because I define the titleLabel using interface builder.. so is there a way to resolve this?
I've hooked it up with IB as well..