NudeIniOS 端富文本控件
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.
评论
PoorEditAndroid 富文本编辑器控件
Android平台富文本编辑器控件支持加粗,斜体,下划线,高亮等字体样式支持todo及列表支持图片插入支持附件插入支持JSON导入导出
PoorEditAndroid 富文本编辑器控件
0
SECoreTextViewiOS 富文本视图控件
SECoreTextView 是一个多行的富文本视图控件,支持可点击链接、文本选择和嵌入图片以及编辑
SECoreTextViewiOS 富文本视图控件
0
SECoreTextViewiOS 富文本视图控件
SECoreTextView是一个多行的富文本视图控件,支持可点击链接、文本选择和嵌入图片以及编辑功能。比UITextView更强大、定制性更高以及更灵活。
SECoreTextViewiOS 富文本视图控件
0
CWAC RichEditTextAndroid 富文本编辑器控件
cwac-richedit是Android上的一个RichEditText编辑器控件。
CWAC RichEditTextAndroid 富文本编辑器控件
0
CWAC RichEditTextAndroid 富文本编辑器控件
cwac-richedit 是 Android 上的一个 RichEditText编辑器控件。
CWAC RichEditTextAndroid 富文本编辑器控件
0
Eleditor移动端富文本编辑器
由于移动设备的交互方式,传统的PC富文本编辑器在移动手机、平板上面无法达到良好的操作体验,Eleditor(elementeditor)顾名思义,旨在对html元素进行操作编辑,实现了唯一开源的真正所
Eleditor移动端富文本编辑器
0