-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
liubo
authored and
liubo
committed
Aug 20, 2017
1 parent
6249b23
commit d7f06c7
Showing
14 changed files
with
193 additions
and
16 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
15 changes: 15 additions & 0 deletions
15
LBNewsComing/LBNewsComing/Classes/common/LBNCImageView/LBNCImageView.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// LBNCImageView.h | ||
// LBNewsComing | ||
// | ||
// Created by liubo on 2017/8/20. | ||
// Copyright © 2017年 刘博. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface LBNCImageView : UIView | ||
//按比例放大、充满 当前视图减掉超出自身区域的图片部分 | ||
@property (strong, nonatomic) UIImageView *imageView; | ||
|
||
@end |
26 changes: 26 additions & 0 deletions
26
LBNewsComing/LBNewsComing/Classes/common/LBNCImageView/LBNCImageView.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// LBNCImageView.m | ||
// LBNewsComing | ||
// | ||
// Created by liubo on 2017/8/20. | ||
// Copyright © 2017年 刘博. All rights reserved. | ||
// | ||
|
||
#import "LBNCImageView.h" | ||
|
||
@implementation LBNCImageView | ||
|
||
- (UIImageView *)imageView{ | ||
if(_imageView == nil) { | ||
_imageView = [[UIImageView alloc] init]; | ||
_imageView.contentMode = UIViewContentModeScaleAspectFill; | ||
self.clipsToBounds = YES; | ||
[self addSubview:_imageView]; | ||
[_imageView mas_makeConstraints:^(MASConstraintMaker *make) { | ||
make.edges.mas_equalTo(0); | ||
}]; | ||
} | ||
return _imageView; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters