Tag Archives: iphone

CKCalendar: an iOS calendar with dead simple customization

July 13, 2012 | Jason Kozemczak

I released my first stab at a calendar widget; it’s available on github. The widget is built to work well on iPhone and iPad. On iPhone, the calendar could be presented modally as a date picker for example. A use case on the iPhone might be to host the calendar in a UIPopoverViewController to use as a date picker. The calendar might also be useful as an on-screen widget on an iPad.

Here’s a quick screenshot with the out-of-the-box styling (note that the previous/next month buttons are awaiting styling):

CKCalendar iOS calendar with default styling

Credit goes to my coworker John Anderson for the default theme. Thanks John!

Future plans include further customization of the control, as well as pre-built UIPopoverViewController for iPad apps to easily integrate the tool. Currently, the next/back buttons need some additional work, but I should have that cleaned up by the weekend.

The control is licensed as MIT (with attribution), so feel free to use however you see fit. I welcome link-backs as a sign of appreciation! Enjoy!

Get the CKCalendar iOS control on Github.

Pet Project: Mechanic.js, a jQuery-esque UIAutomation library for iOS

March 12, 2012 | Jason Kozemczak

A few weeks back, I started working on a new project at work. Our client had a suite of iPad apps that had originally been written by an offshore IT firm. The many-tentacled beast of a codebase had nothing in the form of testing, so early on we started adding basic UATs and regressions where possible in order to safeguard the features of the various iPad apps (which had little to nothing in terms of documentation, etc).

As we worked to add UAT coverage with UIAutomation, I was growing tired of the rather verbose syntax that UIAutomation provides. Many of the functions available to UIAutomation elements have multiple versions of functions (tap, doubleTap, twoFingerTap, tapWithOptions, etc.), and no easy way to traverse an app’s element hierarchy.

I pined for a library that would make interacting with UIAElements as fun and simple as libraries like jQuery, Dojo, Zepto and the like have made interacting with the DOM. When I found there was no such library, I wrote my own: mechanic.js.

Mechanic gives you the element traversal features you know and love from CSS selector engines along with the ability to chain selector functions together. Convenience methods for much of the UIAutomation API have been provided in a “chained” version.

I’ve been working on an initial implementation this week, and API documentation and test coverage are my next concerns in the coming weeks. In the meantime, check it out on Github. If you find a missing or broken feature (and there surely are some), submit an issue (or just fix it yourself and send a pull request via Github.

Hopefully this is useful to more than just myself. Let me know what you think in the comments!