Code Archive

UIView with Selective Borders

Want to do something like this? Or this? UIView lets you add a border on all edges easily like: myView.layer.borderWidth = 1.0f; myView.layer.borderColor = .CGColor; But CALayer does not support selective borders out of the box. That’s why I created a simple open source UIView subclass available on github here: … Read more

Parental Gate For iOS Kids Apps

Here’s a quick and easy way to add a parental gate alert to your iOS kids apps: NAParentalGateAlert on github How it works: Prompts the user to answer a simple math question before proceeding. Uses a UIAlertView for the prompt and a block for the action. If the user answers … Read more