danielamitay / DALinedTextView

DALinedTextView is a UITextView subclass that draws ruled lines to the view, similar to iOS' built-in Notes app. The lines conform to the appropriate line-height for the currently set UIFont.
Other
159 stars 25 forks source link

DALinedTextView does not scroll the lines created in drawRect when we show the keyboard and scroll the text up to show the caret #5

Closed waelsaad closed 8 years ago

waelsaad commented 10 years ago

Hi,

I have sent an email to Daniel on hello@danielamitay.com, I was hoping for a response and I would love to solve the following problem. I have modified the DALinedTextView and attached a copy to demonstrate the issue. Please let me know if the link does not work.

https://www.dropbox.com/s/pso8cn18bb11axh/DALinedTextView.zip?m=

The problem is when we want to display the keyboard and make sure that the caret is above the keyboard frame very similarly to how it works on the notes App on iOS6 also when you keep pressing the enter key the caret should always be displayed above the keyboard with slight animation.

I have implemented this in the file above, however when we scroll the text up pragmatically the lines created in the drawRect is not animated up as well. I have tried using sub layers or views but it does not work properlly also, I can work out how I can get the lines to scroll up when you scroll the text up.

I have been on this issue for sometime as I had implemented my textview very similarly to the DALinedTextView.

I only care about iOS7 but would like to implement the exact behavior of the notes app as it was done on iOS 6

Thanks,

Wael