IOS无线客户端自动化测试
|
@interface SNCommentHeaderView : UIView
{
UIImageView *headerBgView;
UILabel *titleLabel;
}
- (id)initWithFrame:(CGRect)frame
{
NSLog(@"SNCommentHeaderView_init");
self = [super initWithFrame:frame];
if (self) {
// Initialization code
headerBgView = [[UIImageView alloc] initWithImage:[UIImage skinImageNamed:@"comment_sectionheader_title_bg.png"]];
CGRect bgFrame = headerBgView.frame;
bgFrame.origin.y = 10;
headerBgView.frame = bgFrame;
headerBgView.isAccessibilityElement = YES;
[self addSubview:headerBgView];
titleLabel = [[UILabel alloc] initWithFrame:UIEdgeInsetsInsetRect(bgFrame, UIEdgeInsetsMake(0, 0, 1.5, 0))];
titleLabel.backgroundColor = [UIColor clearColor];
titleLabel.font = [UIFont fontWithName:BOLD_FONT_NAME size:12];
titleLabel.textAlignment = UITextAlignmentCenter;
titleLabel.textColor = [UIColor skinColorForKey:SNSkinCommentSectionHeaderColor];
titleLabel.isAccessibilityElement = YES;
[self addSubview:titleLabel];
}
return self;
}
|