How to select text in DTAttributedTextView? - iphone

I'm using DTCoreText DTAttributedTextView in my app to highlight the urls in my text. My other criteria is to be able to select by tapping and holding similar to UITextView. However, DTAttributedTextView doesn't seem to to use a UITextView as a placeholder. Anybody has an idea how I can achieve this?
Thanks

That's a feature that's only available via the paid version of DTCoreText.
from the github page
This is useful for drawing simple rich text like any HTML document without having to use a UIWebView. For text selection and highlighting (as you might need for an Editor or Reader) there is the commercial DTRichTextEditor component which can be purchased in the Cocoanetics Parts Store.

Related

Display Rich Text Content as UIWebView or UILabel+CoreText

I'd like to display rich text content in my app. I want user to create simple WYSIWYG input with support of bold, italics, shadow, outline, image HTML-like tags. I am puzzled if I should go with UIWebView or custom written UILabel/UIView which can have CoreText framework added to support all those above stated properties. I see there are libraries which are using both approaches.
Does anyone have an experience dealing with these approaches who can suggest cons and pros? Thanks
The web view approach has quite an overhead and likely a delay to display the rendered text. I would recommend using DTCoreText.

Is there a way to pan in sublime text 2?

Does anyone know of a sublime text plugin that allows you to pan code similar to a Photoshop file canvas?
Space+drag or Middle Mouse+drag?
I can imagine this becoming useful if you don't have text wrapping on in a very tall document. If a plugin doesn't exist then it might be possible that I could start work on one.
Thanks!
No way yet, I added feature request on the website, you can upvote.
http://sublimetext.userecho.com/topic/159170-drag-scroll-or-pan-or-touch-scroll/
I looked into plugin API, and it seems not to provide a way to implement this as a plugin.

How to allow text highlighting in an iPad app?

I'm making an iPad magazine app where the user will be able to highlight any amount of the text. These highlights will need to be saved and appear everytime that article is loaded.
Can I do this somehow with CoreText (which is currently what I am using to allow multi-columned formatting)?
I have noticed that selecting text using HTML in a UIWebView doesn't work properly if there are images within the text.
Anyone have any advice?
Thanks a lot,
-Chris
There's no built in support in CoreText for selection or "Copy & Paste", but you can make your own selection engine using some CoreText functions.
Take a look at this other topic post.
Core Text - select text in iPhone?

Highlighting a string in a pdf iphone

I'm developing a book app.My client has provided all the contents of pdf.
I have already implemented all the contents of pdf to book.
But he wanted to highlight a text in that pdf.
The user would like the text to allow for highlighting (like if you're reading a paper book).
Is this possible? Can anyone help me on this, please?
Thanks in advance.
Theoretically yes.. depends on a bit hacking and other things, for example fonts used in the PDF. Have a look at PdfKitten, their demo project can find text in a PDF and highlight it. That should give you a first pointer on how to highlight. If you want to the user to highlight with the touches you would need to be able to transform locations of touches into the PDF to determine where exactly the user touched, but it should be possible.

Make pdf reader like functionality in my app (highlight the content)

I need a functionality like in the iphone pdf reader.
i want that user select some text content and that content should be highlighted with yellow color.
Currently i am using text view and want to know that can i achieve same functionality in it.
or i have to shift to pdf ?
Please tell that how to achieve that in either of the two.
You can try NSAttributedString-Additions-for-HTML
Take a look at EGOTextView
A drop-in replacement for UITextView that amongst other things supports attributed strings. This would allow you to achieve your aim of selecting text, and then applying a style to that selection such as a yellow highlight.