萤石云 iOSSDK,移植跨平台相关工程
EZSDK/EZSDK/EZ/Base/HDLEZTopBarView.m
@@ -24,7 +24,10 @@
        [self addSubview:self.titleLabel];
        [self addSubview:self.bottomLine];
        [self addSubview:self.rightButton];
        [self addSubview:self.leftButton];
        [self.rightButton setHidden:YES];
        [self.leftButton setHidden:YES];
        [self.bottomLine setHidden:YES];
    }
    return self;
}
@@ -32,13 +35,32 @@
- (UIButton*)backButton{
    if(!_backButton){
        //buttonWithType UIButtonTypeSystem 设置tintColor 就可以改变图片的颜色
        _backButton = [UIButton buttonWithType:UIButtonTypeSystem];
        _backButton.frame = CGRectMake(16, HDLEZ_APP_STATUS_BAR_HEIGHT+(40-20)/2, 12, 20);
        _backButton = [HDLEZButton buttonWithType:UIButtonTypeSystem];
        _backButton.frame = CGRectMake(16, HDLEZ_APP_STATUS_BAR_HEIGHT+(44-20)/2, 12, 20);
        [_backButton setImage:[UIImage imageNamed:@"hdl_ez_ic_nav_back"] forState:UIControlStateNormal];
        _backButton.tapHeight=40;
        _backButton.tapWidth=80;
        //按钮图标颜色
        _backButton.tintColor = HDLEZ_COLOR_TEXT;
    }
    return _backButton;
}
/*左边按钮
 */
-(UIButton*)leftButton{
    if(!_leftButton){
        //buttonWithType UIButtonTypeSystem 设置tintColor 就可以改变图片的颜色
        _leftButton = [HDLEZButton buttonWithType:UIButtonTypeSystem];
        _leftButton.frame = CGRectMake(16, HDLEZ_APP_STATUS_BAR_HEIGHT+(44-20)/2, 80, 20);
        [_leftButton setTitleColor:HDLEZ_COLOR_TEXT_TITLE_GRAY forState:UIControlStateNormal];
        _leftButton.titleLabel.font=HDLEZ_Get_FontRegularWithSize(HDLEZ_FontSize_14);
        _leftButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
        _leftButton.tapHeight=40;
        _leftButton.tapWidth=80;
    }
    return _leftButton;
}
- (UILabel *)titleLabel{
@@ -63,10 +85,13 @@
    if(!_rightButton){
        //buttonWithType UIButtonTypeSystem 设置tintColor 就可以改变图片的颜色
//        _rightButton = [UIButton buttonWithType:UIButtonTypeSystem];
        _rightButton=[[UIButton alloc] init];
        _rightButton.frame = CGRectMake(HDLEZ_APP_SCREEN_WIDTH-16-60, HDLEZ_APP_STATUS_BAR_HEIGHT, 60, 44);
        _rightButton=[[HDLEZButton alloc] init];
        _rightButton.frame = CGRectMake(HDLEZ_APP_SCREEN_WIDTH-12-32, HDLEZ_APP_STATUS_BAR_HEIGHT+(44-32)/2, 32, 32);
        [_rightButton setTitleColor:HDLEZ_COLOR_TEXT_LIGHT_BLUE forState:UIControlStateNormal];
        _rightButton.titleLabel.font=HDLEZ_Get_FontRegularWithSize(HDLEZ_FontSize_14);
        _rightButton.tapHeight=44;
        _rightButton.tapWidth=44;
        //按钮图标颜色
//        _backButton.tintColor = HDLEZ_COLOR_TEXT;
    }
@@ -94,7 +119,15 @@
}
//设置右边按钮标题
/*设置左边按钮标题
 */
-(void)setLeftBtnTitle:(NSString *)leftBtnTitle{
    _leftBtnTitle=leftBtnTitle;
    [_leftButton setHidden:NO];
    [_leftButton setTitle:leftBtnTitle forState:UIControlStateNormal];
}
/*设置右边按钮标题
 */
-(void)setRightBtnTitle:(NSString *)rightBtnTitle{
    _rightBtnTitle=rightBtnTitle;
    [_rightButton setHidden:NO];