Comments (10)
Just to add to it, here is a long discussion on the topic (from a site that I had never heard of before):
I'm not sure if this can be prevented by your code, but it might be worth looking into. It seems to have something to do with AttributedString, but it does not appear to be certain.
from activelabel.swift.
Hi @gloparco! Thanks for reporting this.
We're using ActiveLabel just as part of a UITableView, so we haven't had this issue so far and unfortunately don't have the capacity at the moment to look into it in depth.
However we'd be more than happy to merge a PR which resolves this issue.
from activelabel.swift.
@gloparco I am using ActiveLabel in an UITableViewCell but every time i set a text containing an @ or # I get a NSRangeException.
from activelabel.swift.
Hi @byAmmerix, in what SDK and iOS version have you noticed it?
from activelabel.swift.
I am using:
Cocoapods: pod 'ActiveLabel', '~> 0.4'
iOS version/SDK: 9.2
It is the same bug as @JaviSoto already mentioned in #40.
The crash occurs at:
mutAttrString.setAttributes(attributes, range: element.range)
from activelabel.swift.
+1 happens to me every time i close and reopen a given tableview repeatedly.
from activelabel.swift.
@alexbredy what dependency manager are you using? iOS and SDK version?
from activelabel.swift.
Hi @poolqf
Using Cocoapods with
iOS version 9.2.1 and SDK 9.2 (Xcode 7.2.1)
Update regarding the issue I'm having:
The crash does not occur if I'm not adding cells upon opening the tableview. Somehow when I keep adding rows with the same url it crashes after 4-5 times closing and reopening the tableview.
The crash does not happen if the cells are unaltered.
from activelabel.swift.
The problem is most likely possibly due to row 190 in ActiveLabel.swift:
dispatch_async
Quickfix: Comment out that row (and consequently the closing } on row 194) and let the commands execute on the main thread instead and the crash is no more.
Be very careful trying to do stuff outside the main thread.
It's therefore also well worth noting the dispatch_after
call made in the onTouch
method.
from activelabel.swift.
I've removed the dispatch_async
in #47
I am now going to create a new release. Closing this issue.
Feel free to reopen it if it happens again
cc/ @byAmmerix , @alexbredy , @JaviSoto
from activelabel.swift.
Related Issues (20)
- To deal with warning HOT 1
- ActiveLable show text mismatch real data HOT 2
- How to active email ? HOT 1
- If there are the same mention, can I know which one is clicked HOT 2
- How to calculate the height of swiftui HOT 1
- Active table #tag not working for Tamil language properly HOT 1
- HTML tags not working properly HOT 1
- customeType does not work
- Email Support has not been included in the PODS
- string have mention username without space it is not working HOT 1
- configureLinkAttribute 点击后无效
- Add padding to LabelView in swiftui does not work. HOT 1
- Nn
- Tap Label outside of tags and mentions
- Label insets Issue
- How do I use a filterHashtag in swift5
- URL Link selected font
- In mention username with dot is not detecting HOT 2
- handleCustomTap not working
- In mentions(@) full user name not detected only first name is detecting HOT 2
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 activelabel.swift.