An ImageView on which a dynamic/fixed height text can be displayed and it can take action also.
Add BLImageView class into your project.
#import "ViewController.h"
#import "BLImageView.h"
@interface ViewController()
@property (weak, nonatomic) IBOutlet BLImageView *imageView;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Set dynamicHeight to automatic growing text
_imageView.dynamicHeight = YES;
// Set textHeightLimit to restrict the text height growing
_imageView.textHeightLimit = 0.4;
// Set text
_imageView.overLabel.text = @"Jennifer Lawrence stars in The Hunger Games: Mockingjay Part 2";
//Set delegate if you need action on image touchUpInside
_imageView.delegate = self;
}
#pragma mark - Image Click Action
- (void)blImageViewClickAction:(id)sender {
NSLog(@"Yay, Image is clicked!");
}
Check out Example project and try out things in detail.
- You can customize overLabel and overView
- iOS 7 or higher
- Automatic Reference Counting (ARC)
BLMultiColorLoader is released under the MIT license. See the LICENSE file for more info.