我有一个自定义的 UI 表格单元格代码,它被导入到控制器中。在控制器中,我希望进行一些更改(更改边框、颜色等)。我在 XIB 中连接了 ref 插座,但是当我尝试在 Controller 中进行更改时,没有任何反应。这是我的Controller.m:
@synthesize btnExpDate;
- (void)viewDidLoad
{
[super viewDidLoad];
//detect iOS 7
NSString *ver = [[UIDevice currentDevice] systemVersion];
float ver_float = [ver floatValue];
if (ver_float >= 7.0) {
// adds border to borderless button for iOS 7
btnExpDate.layer.BorderWidth = 1;
btnExpDate.layer.CornerRadius = 4;
btnExpDate.layer.borderColor = [UIColor colorWithRed:230.0/255.0 green:230.0/255.0 blue:230.0/255.0 alpha:1.0].CGColor;
}
控制器.h
#import <UIKit/UIKit.h>
@class PullInventoryAddLotsTableCell;
@interface PullInventoryAddLotController : JCBaseController {
NSMutableArray* _newlyAddedLots;
}
@property (nonatomic, retain) IBOutlet UIButton* btnExpDate;
@end