Sample Code
Parental Gate SDK for iOS Apps
20 October 2013, 15:30
With the release of iOS 7, Apple updated it’s rules for apps being submitted to the iTunes App Store. One of the changes calls for a parental gate. I always envisioned that my apps targeted at toddlers were an activity that the parent and child did together, however, I realize that this is probably a romantic ideal. So, in order to comply with the new rules, I wrote a dexterity based parental gate that requires the user to touch two moving icons simultaneously. If the user fails to do so and touches anyway where else in the view, the gate will fail. Read More...
Comments
Social Sharing on iOS 6
16 September 2012, 10:00
The upcoming version of iOS 6 has built in ability for users to post information to various social media sites, such as Facebook, Twitter, and Weibo. In fact, Apple has added an entirely new framework in iOS 6, the Social framework, to help developers to add social sharing features to their apps.
I had the goal of making a simple way users of my apps could post to their social accounts about their usage of my apps. Nothing special, just a “I like this app” kind of thing. My design paradigm for my apps has been to use a grouped table view to hold an app’s configuration and other information, much like the Settings app. So my goal to introduce a social sharing feature was to make a fairly self contained table view cell that would enable a social sharing feature and could be easily “dropped in” to my configuration table views. I accomplished this with a class called MKSocialShareTableViewCell, which leverages the SLComposeViewController feature of the Social framework. I’ve added this class to the open sourced library iPhoneMK. You can download the code on github.
The basic usage paradigm for MKSocialShareTableViewCell is to add it as a cell you your table view as you would add any other cell (it should have its own reuse identifier), then you set the cell’s post test, images, and URLs. That’s it, as the cell will handle all user interaction.
I had the goal of making a simple way users of my apps could post to their social accounts about their usage of my apps. Nothing special, just a “I like this app” kind of thing. My design paradigm for my apps has been to use a grouped table view to hold an app’s configuration and other information, much like the Settings app. So my goal to introduce a social sharing feature was to make a fairly self contained table view cell that would enable a social sharing feature and could be easily “dropped in” to my configuration table views. I accomplished this with a class called MKSocialShareTableViewCell, which leverages the SLComposeViewController feature of the Social framework. I’ve added this class to the open sourced library iPhoneMK. You can download the code on github.
The basic usage paradigm for MKSocialShareTableViewCell is to add it as a cell you your table view as you would add any other cell (it should have its own reuse identifier), then you set the cell’s post test, images, and URLs. That’s it, as the cell will handle all user interaction.
Custom Animation with Sound - Take 2
04 July 2011, 09:43
I am developing a new iOS app where I needed an easy way to animate image sequences, move them, and have sound coordinated with it all. My first attempt at doing this was functional, but it did not use
CAAnimation
to control the image sequence. However, performance wasn't the best. So I rewrote the MKSoundCoordinatedAnimationLayer
class to use CAAnimation
internally to coordinate everything. Read More...Custom Animation with Sound
18 January 2010, 14:42
For a project I am currently working on, I had the need to have more control over an animation sequence of images then what the built in support that UIView or CALayer provides. The import features I needed included sound coordination and heterogeneous frame durations. So, I wrote my own class to do this. Read More...
Networked Image View
23 September 2009, 00:25
Sometime it is prefered that the image that gets displayed in an iPhone app is downloaded from the internet, much like an image in a web page. In order to make displaying a networked image as simple to accomplish as the UIKit's
Read More...
UIImageView
, I created the MKNetworkImageView
class. Read More...
Number Badge View
08 September 2009, 00:07
While the iPhone SDK has facilities to show a number badge on your app's icon or in a toolbar, it doesn't allow you to arbitrarily place or use number badges. So, I wrote a view class that implements a number badge. Read More...