Coder Social home page Coder Social logo

rztime / rzcolorful Goto Github PK

View Code? Open in Web Editor NEW
69.0 3.0 13.0 2.41 MB

NSAttributedString富文本的方法集合,以及简单优雅的使用其多种属性

License: MIT License

Objective-C 98.67% Ruby 1.33%
uilabel uitextfield uitextview attributedtext nsattributedstring

rzcolorful's People

Contributors

rztime avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rzcolorful's Issues

如何给html里的图片添加点击事件?

你好,我看了你的示例代码,里面有把html转变成NSAttributedString的方法

NSAttributedString *attributeString = [NSAttributedString htmlString:html];
......
cell.textLabel.attributedText = attributeString;

但是,如果html里面有图片,比如

<img src=“https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1574248377078&di=cf53e56d95c97225082e2063d94fb151&imgtype=0&src=http%3A%2F%2Fi1.sinaimg.cn%2Fent%2Fd%2F2008-06-04%2FU105P28T3D2048907F326DT20080604225106.jpg” />

要如何给这个图片添加点击事件呢?

大侠 更新后 直接奔溃!!!

奔溃信息:
Terminating app due to uncaught exception 'NSRangeException', reason: 'NSMutableRLEArray objectAtIndex:effectiveRange:: Out of bounds'

如何获取富文本的url地址?

[cell.textLabel rz_colorfulConfer:^(RZColorfulConferrer * _Nonnull confer) {
        confer.appendImageByUrl(@"http://pic28.photophoto.cn/20130830/0005018667531249_b.jpg").bounds(CGRectMake(0, 0, 200, 0)).paragraphStyle.alignment(NSTextAlignmentLeft); // 宽或高为0时,即自动宽/高按照图片比例来
    }];

当我保存成html后,上传到服务器. 然后我进行编辑的时候,我用html to objectC/ 这时候,我如何获取url:http://pic28.photophoto.cn/20130830/0005018667531249_b.jpg ?

更新不到最新版

大侠,你更新后没推到cocoapods吧 都search不到 更新不到你1.4.0啊

iOS 13 或者 iOS 14 填入HTML的时候 有网络图的无法加载出来图片如何解决?

比如HTML文本如下:
@"哦吧你不会比谁都不休的白色修身

才能完呢冲破恩微博撇那狗骗你我饿够了呢比你耳边n伪军抹去你问邪恶

<img src="http://yk3.gokuai.com/index/thumb?mount_id=1255485&amp;type=jpeg&amp;hash=c36c982f5d047666d7173c3625550152a2d403e6&amp;filehash=ca9ab472b4914bc0b3e7eefc9fa0fa66d75091bf&amp;big=1\" alt="Gravatar" style="max-width:100%;display: block; position: relative; margin: auto;">

热敷已成为8哦鳄鱼从背后有我饿

<img src="http://yk3.gokuai.com/index/thumb?mount_id=1255485&amp;type=jpeg&amp;hash=565b67349cf2f08d4c373b350355adae46d7199c&amp;filehash=169585a54ecc8311159717a1f8334ba0045a7532&amp;big=1\" alt="Gravatar" style="max-width:100%;display: block; position: relative; margin: auto;">

<a href="http://yk3.gokuai.com/file/hb14k046sx0l6gn2h471nkxm8i9zcau1#\" target="_blank"><img src="http://dn-preview.gokuai.com/23/237b4494a9cc56b3c29dc1d34be8340774cf9ce6_1280.jpg\" alt="File" style="max-width:100%;">去年细纹卡马乔全部下次去把握和刺猬比欧巴

"

麻烦把Pod Repo也更新一下哦

git://cocoapodscn.com/Specs.git 这个repo是否也有更新?
另外RZTextView有个小问题,就是复制粘贴后自动滚到顶部去,能否解决?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.