Category Archives: Programming

How to Create Inner Shadow to a UIView with Swift

After searching a lot on Google and reading answers on stackoverflow and blogs, this is by now my understanding of the relationships between UIView’s different properties:

UIView is based on CALayers, CALayer has a shadow property and can have a mask, the mask is a CGPath, CGPath comprises one or more shapes (arc, rectangle, etc.), and can perform boolean operations (union, subtraction, etc.). This is how it looks after putting above-mentioned theories together:

UIView inner shadow
Applying inner shadow to UIView

Example code: https://github.com/okakaino/InnerShadowTest

How to Program Attiny84 to Use nrf24l01 Module with Arduino IDE

I want to create a drumkit that transmits MIDI signals wirelessly, to some MIDI processing device, say, a Mac or an iPhone. Arduinos are powerful and easy enough to get started with, but I want my project to be more portable and task specific, so I decide to shrink it down to an attiny84 powered board.

Lucky as I am, I found this Optimized High Speed NRF24L01 library by TMRh20, which is powerful and easy to use, and also supports Attiny series microcontrollers. Continue reading How to Program Attiny84 to Use nrf24l01 Module with Arduino IDE