iOS 端富文本控件 NudeIn
- 授权协议: MIT
- 开发语言: Objective-C
- 操作系统: iOS
- 软件首页: https://github.com/hon-key/Nudeln
- 软件文档: https://github.com/hon-key/Nudeln/blob/master/README.md
- 官方下载: https://github.com/hon-key/Nudeln/releases
软件介绍
NudeIn
NudeIn 是一个基于 UITextView ,书写风格类似于 masonry 的 iOS 端富文本控件,它采用优雅的声明式方法定义富文本控件,和编程式的不同,它所需的代码量相当短,且非常直观易用。
Usage
NudeIn 的用法非常简单明了,这里给出一个非常简单的例子,相信你会被这样的用法惊艳到,一旦用起来就会爱不释手:
1、引入控件
#import "NudeIn.h"
2、声明控件为你的成员变量
@property (nonatomic,strong) NudeIn *attrLabel;
3、Do it yourself
_attrLabel = [NudeIn make:^(NUDTextMaker *make) {
make.text(@"this is a ").font(14).color([UIColor blackColor]).attach();
make.text(@"BlueLink").font(17).color([UIColor blueColor]).link(self,@selector(linkHandler:)).attach();
make.text(@", and this is a ").font(14).color([UIColor blackColor]).attach();
make.text(@"RedLink").font(17).color([UIColor redColor]).link(self,@selector(linkHandler:)).attach();
}];3、对声明了 link 属性的部分定义回调
- (void)linkHandler:(NUDAction *)action {
if ([action isKindOfClass:[NUDLinkAction class]]) {
NUDLinkAction *linkAction = (NUDLinkAction *)action;
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:linkAction.string message:nil preferredStyle:UIAlertControllerStyleAlert];
[alertController addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
}]];
[self presentViewController:alertController animated:YES completion:nil];
}
}结果会是这样:
点击带有 link 属性的部分,将产生回调:
Installation
pod 'NudeIn' '~> 1.2.1-beta'
最新 pod 版本:1.2.1-beta
目前该版本属于不稳定版本
最低 iOS 版本: 8.0
License
NudeIn is released under the MIT license. See LICENSE for details.
算法导论(原书第3版)
Thomas H.Cormen、Charles E.Leiserson、Ronald L.Rivest、Clifford Stein / 殷建平、徐云、王刚、刘晓光、苏明、邹恒明、王宏志 / 机械工业出版社 / 2012-12 / 128.00元
在有关算法的书中,有一些叙述非常严谨,但不够全面;另一些涉及了大量的题材,但又缺乏严谨性。本书将严谨性和全面性融为一体,深入讨论各类算法,并着力使这些算法的设计和分析能为各个层次的读者接受。全书各章自成体系,可以作为独立的学习单元;算法以英语和伪代码的形式描述,具备初步程序设计经验的人就能看懂;说明和解释力求浅显易懂,不失深度和数学严谨性。 全书选材经典、内容丰富、结构合理、逻辑清晰,对本科......一起来看看 《算法导论(原书第3版)》 这本书的介绍吧!
