Comments (1)
事实上,确实是缺少一种通用的入口去设置这种文字序号,不过单独为这种序号添加功能却有点不太通用,即使实现了这种入口,实际上想要自定义风格的话成本还是挺大的。
实际上,通过现有的接口,想要写出这样的效果其实并不复杂。
假设有这样一种需求:
我们需要从后台拉取一个数组的字符串,并以列表的方式显示,显示效果类似:
- 第一条
- 第二条
- 第三条
写法如下:
NudeIn *numberList = [NudeIn make:^(NUDTextMaker *make) {
make.textTemplate(@"number prefix").···.attach();
for (int i = 0; i < textArray.count; i++) {
make.text([NSString stringWithFormat:@"%d. ",i]).attachWith(@"number prefix",nil);
make.text(string).···.ln(1).attach();
}
}];
from nudein.
Related Issues (20)
- 剔除 mergeComp 函数
- No English document HOT 1
- 和我的想法差不多啊,连语法都类似~ HOT 1
- 1.2.4版本滚动问题修复
- 怎么显示html HOT 1
- 是否支持文字竖版?谢谢 HOT 1
- TODO:添加显示 html 功能
- bug:自定义方法无法用在模板里
- 背景色是否支持渐变色 HOT 1
- 如何更新文本内容了 HOT 1
- 在swift中怎么使用呀?我pod导入后,不会用,尴尬。。。 HOT 1
- 无法透传点击事件 HOT 3
- 怎么计算文本宽度? HOT 4
- NUDLinkAction里的url属性怎么赋值? HOT 2
- 在cell里要怎么使用 HOT 1
- TODO:remake功能 HOT 1
- TODO:高亮 HOT 1
- TODO:innerText功能
- 感谢作者的开源作品, 有个问题, 绑定点击事件相关. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nudein.