Pencil and Eraser - aka Finger

Be it the classroom or a meeting or even a conference, you do want to jot down some notes on what you saw, heard or related information. Now, it would be nice if many of us were as organised, but then there are plenty that have an ipad (the Pro) and also a pencil. For note taking, there are a couple of good apps, but I ended up with purchasing Linea which is currently my favorite app for note taking. From the wide number of features available with Linea, the one that is most useful is using the pencil for drawing and the finger to erase. That is what we will discuss in this article.

This week, I met up with a lot of people (IRL) that I knew from the internet, never face to face. One of the people that I knew was Caroline Begbie(@carolinebegbie on twitter). When I met her at the conference she was stoked that there was someone that knew her. If you are wondering who Caroline is, she is an amazing developer from Queensland, Australia and currently she is known to those that follow the Ray Wenderlich site for tutorials. Her video tutorials on Metal are amazing. While we got chatting, I mentioned Linea and was talking about the wonderful feature where you can draw with the pencil and erase with the finger, she immediately responded, they used my idea. To be honest, I was a bit confused and then it hit me. Around January 2016, she had written an article on creating a drawing app on the iPad pro and the pencil, including handling the tilt and the pressure.

I was mentioning the fact that the touches can also get the area of the touch using the majorRadius property, which works to identify the difference between a stylus and a finger touch. At this point, Caroline reminded that the new touch API's also detects the touch created by the pencil and the finger and this is as simple as simply querying the type property of the touch. If it is of type stylus it is the pencil and if not, it is a finger. So you can switch tools based on the touches.

It is so simple but like so many more simple things, these surface in such discussions and are a learning for a long time to come.

In case you want to read Caroline's article and create your own apple pencil drawing app, you can read about it on https://www.raywenderlich.com/121834/apple-pencil-tutorial

Comments

Popular Posts