一,效果图。
images/loading.gif' data-original="http://images2015.cnblogs.com/blog/337518/201510/337518-20151020153014458-733930025.jpg" width="218" height="400" />
二,工程图。
三,代码。
ViewController.h
#import <UIKit/UIKit.h>@interface ViewController : UIViewController@end
ViewController.m
#import "ViewController.h"//加入头文件#import "HBLabel.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. HBLabel * label=[[HBLabel alloc]initWithFrame:CGRectMake(50, 50, 200, 30)]; [label setTextAndIcon:@"[月亮]这是HBLabel的测试[转圈][发怒][抠鼻]这是HBLabel的测试[傲慢][得意][吐][弱]这是HBLabel的测试[晕][擦汗]"]; label.font=[UIFont systemFontOfSize:14]; [self.view addSubview:label];}
原标题:【代码笔记】图文混排(HBLabelDemo)
关键词: