Comments (3)
I can't reproduce this crash on the development branch. What is the text in the label and attribute?
from kilabel.
try this attributed string:
NSMutableAttributedString *string = [NSMutableAttributedString new];
[string appendAttributedString:[[NSAttributedString alloc] initWithString:@"I have "]];
[string appendAttributedString:[[NSAttributedString alloc] initWithString:@"http://google.com/" attributes:@{NSLinkAttributeName:@"http://google.com/"}]];
[string appendAttributedString:[[NSAttributedString alloc] initWithString:@", "]];
[string appendAttributedString:[[NSAttributedString alloc] initWithString:@"http://google.com/" attributes:@{NSLinkAttributeName:[NSURL URLWithString:@"http://google.com/"]}]];
[string appendAttributedString:[[NSAttributedString alloc] initWithString:@", and http://google.com"]];
label.attributedText = string;
from kilabel.
Thanks for the quick reply. The problem is because KILabel is assuming NSLinkAttributeName is a string. This is actually fixed on the develop branch where we are checking type of the object (It can be either string or url but url is preferred).
I was planning on releasing the develop branch over the next few days so it's fairly stable if you want to get the fix now. Otherwise I'll close this when I've finalised the 1.1 release.
Thanks
pod 'KILabel', :branch: 'develop'
from kilabel.
Related Issues (20)
- Missing Colon HOT 2
- Don't support carthage
- Wrong Content Height Issue for no text HOT 4
- change the font of label,but it doesn't work
- Is it only using '@' to link a userName ?
- How to use ignoredKeywords?
- multiple tags written without spaces
- df
- Showing Phone number, Url and a simple string which like "Watch the videos" as a link
- UITableViewCells tap not getting recognised when used along with a UIGestureRecogniser HOT 4
- attributedText not works HOT 1
- Question about touchesBegan in touchesEnded
- link is not visible on ipad
- Swift 4, username handles not recognized
- Detect a specific domain
- Click Not working in UITableViewCell HOT 3
- Doesn't detected HasTag string
- Wrong Content Height Issue for another language
- gesture and kilabel HOT 1
- Usernames with . in them are not fully detected
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 kilabel.