// // NIMCustomLeftBarView.m // NIMKit // // Created by chris. // Copyright (c) 2014年 Netease. All rights reserved. // #import "NIMCustomLeftBarView.h" #import "NIMBadgeView.h" #import "UIView+NIM.h" @implementation NIMCustomLeftBarView - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { // Initialization code [self initSubviews]; self.userInteractionEnabled = YES; } return self; } - (void)initSubviews { self.backImgV = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 24, 34)]; self.backImgV.image = [UIImage imageNamed:@"vqu_images_navigation_back_black"]; self.backImgV.contentMode = UIViewContentModeScaleAspectFill; [self addSubview:self.backImgV]; self.badgeView = [NIMBadgeView viewWithBadgeTip:@""]; self.badgeView.frame = CGRectMake(24, 8, 0, 0); self.badgeView.hidden = YES; self.badgeView.badgeBackgroundColor = [UIColor whiteColor]; self.badgeView.CirclegroundColor = [UIColor whiteColor]; self.badgeView.badgeTextColor = LZ273145Color; self.badgeView.badgeTextFont = LCFont14; self.frame = CGRectMake(0.0, 0.0, 70.0, 44.f); [self addSubview:self.badgeView]; } - (void)layoutSubviews{ [super layoutSubviews]; for (UIView *view in self.subviews) { view.nim_centerY = self.nim_height * .5f; } } @end