RegexHighlightView icon indicating copy to clipboard operation
RegexHighlightView copied to clipboard

Optimize the CoreText render part - address issue #6 from main repo

Open mojocatplay opened this issue 12 years ago • 7 comments

Address the two issues in the comment: https://github.com/KayK/RegexHighlightView/issues/6#issuecomment-1130667 6

mojocatplay avatar May 24 '13 13:05 mojocatplay

Hi there, thanks for this fix to one of the posted issues - however I have recompiled using your fix and I still have exactly the same problem...

TwentyThreeDegrees avatar Jun 10 '13 18:06 TwentyThreeDegrees

Can I check which font did you use? I am using a fixed-width font and have not test it with other font (sorry) so it could be it.

Or maybe it could be because of issue #7 where line break modes for CoreText and UITextView differ?

mojocatplay avatar Jun 11 '13 02:06 mojocatplay

It's Courier. I think you're right it might be an issue with the line breaks...

TwentyThreeDegrees avatar Jun 11 '13 08:06 TwentyThreeDegrees

It's quite easy to check if the invisible text matches with the coretext overlay by setting the text of the textview from clearColor to blackColor (or whiteColor if background color is dark color).

mojocatplay avatar Jun 11 '13 08:06 mojocatplay

Ah yes. It absolutely does not line up, the line break occurs in a different place! And you can't set the line break mode of the UITextView.

TwentyThreeDegrees avatar Jun 11 '13 09:06 TwentyThreeDegrees

@TwentyThreeDegrees @mojocatgames Have any of you tried to fix this with iOS 7? I think you were close to the fix.

ndrewh avatar Oct 02 '13 01:10 ndrewh

I haven't looked with iOS7 yet to be honest, no, for all I know there might be better support with some new classes, but no idea as of yet I'm afraid.

On Wed, Oct 2, 2013 at 2:19 AM, NerdYouDontKnow [email protected]:

@TwentyThreeDegrees https://github.com/TwentyThreeDegrees @mojocatgameshttps://github.com/mojocatgamesHave any of you tried to fix this with iOS 7? I think you were close to the fix.

— Reply to this email directly or view it on GitHubhttps://github.com/KayK/RegexHighlightView/pull/9#issuecomment-25506958 .

TwentyThreeDegrees avatar Oct 02 '13 07:10 TwentyThreeDegrees