Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toogle button in toolbar doesn't work... #53

Open
HaraldBregu opened this issue Feb 22, 2015 · 3 comments
Open

Toogle button in toolbar doesn't work... #53

HaraldBregu opened this issue Feb 22, 2015 · 3 comments

Comments

@HaraldBregu
Copy link

When you start writing on textview the toggle of bar button doesn't work. You can deselect it and cant select anymore and viceversa. To make it work again you must to add a space in the textview. I tried to fix the code but i don't understand were is the problem.
Can somebody help me?

@Deadpikle
Copy link

Hey Aldo,

I've attempted to fix this bug in my fork of the code by replacing code in richTextEditorToolbarDidSelectBold/richTextEditorToolbarDidSelectItalic/etc. in RichTextEditor. Instead of

    UIFont *font = [self fontAtIndex:self.selectedRange.location];

do

    UIFont *font = [[self typingAttributes] objectForKey:NSFontAttributeName];

Try that and see how it works. I can't remember if it had bad side effects or not or if I had to change more than that to get the buttons to work.

@HaraldBregu
Copy link
Author

Hi Deadpikle,

Great, your fork is working better, i'm using your version now with cocoa pods. I needed to install PSPDFTextView too.

Thank you.

@Alisha786
Copy link

Hey what to do in underline case??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants