1
2
3
4
5
6

SmartyPantsCoding.com

I've always been a coder at heart. Since I was a kid all I've wanted was to create cool things with computers - well, and play video games.

SmartyPantsCoding is my hub for all the apps and games I create and the home for my ramblings about a variety of topics and technologies.

@SmartyP

creations

Games

I like to write games that are simple and fun to play.

Matchingo - A Memory Matching Game

A modern twist on the memory matching card game you played as a kid in full 3D with combo multipliers, explosions, and tons of customization options.

Word Search Little Books

The best word search game on Android, Windows 8, and Kindle Fire. Intuitive gameplay, and interesting puzzle book topics.

Maze Racer

Race through over a dozen user submitted mazes to see how you stack up in this Samsung Galaxy Note exclusive.

Hungry Castaway

Help our friendly castaway navigate the waves as he tries to survive another day on a deserted island.

Blackjack Metro

Enjoy this full featured blackjack game inspired by the Metro design system of Windows Phone.

Apps

I like to write apps that are innovative and utilitarian.

Line Diet

The simplest app for keeping track of your weight loss goals. Find out daily if you need to diet or can take it easy that day and still meet your long-term goals.

Imagewind

Watch an endless stream of images as they are posted to Instagram, Twitter, and Flickr. See what people are really doing on the social web.

Magic Black Ball

Ask the old reliable magic black ball anything you want - it's always right, trust me.

Mortal Kombat Guide

Your cheat sheet to all the moves and fatalities in the latest Mortal Kombat released in 2011 for XBox 360 and PS3.

Fortune Cookie Teller

Ever wish you could have a fortune cookie after every meal? Well now you can.

 

recent blog entries

Using Custom Unwind Segues with Xamarin.iOS

As you probably know by now, I'm a huge advocate for Xamarin technologies for native iOS and Android apps. After trying to implement some custom unwind segues for an iPad app, I discovered that no-one had documented how to do them using Xamarin.iOS yet, so I wanted to throw something together to hopefully save others time down the road.

I've created a Github repo at the link below which includes two sample projects. One sample project shows custom segues and custom unwind segues within a UINavigationController, and the other sample shows how to do custom segues without a navigation controller. The second sample is largely ported from this article.

Xamarin Custom Segue Samples - Github

I also recorded a 15 minute screencast showing how to do it all, you can find that here:
Xamarin Custom Unwind Segue Screencast - YouTube

Also, folks are frequently curious what C# code written in Xamarin.iOS looks like as compared to Objective-C, so below are two custom segues - the first in Obj-C (from the source link above), and the ported C# that does the same thing:

Objective-C:

@implementation CustomUnwindSegue
 
- (void)perform {
    UIViewController *sourceViewController = self.sourceViewController;
    UIViewController *destinationViewController = self.destinationViewController;
 
    // Add view to super view temporarily
    [sourceViewController.view.superview insertSubview:destinationViewController.view atIndex:0];
 
    [UIView animateWithDuration:0.5
            delay:0.0
            options:UIViewAnimationOptionCurveEaseInOut
            animations:^{
                // Shrink!
                sourceViewController.view.transform = CGAffineTransformMakeScale(0.05, 0.05);
                sourceViewController.view.center = self.targetPoint;
            }
            completion:^(BOOL finished){
                [destinationViewController.view removeFromSuperview]; // remove from temp super view
                [sourceViewController dismissViewControllerAnimated:NO completion:NULL]; // dismiss VC
            }];
}
 
@end

C#:

public override void Perform()
{
    // Add view to super view temporarily
    SourceViewController.View.Superview.InsertSubview(DestinationViewController.View, 0);

    UIView.Animate(0.5f, 0.0f, UIViewAnimationOptions.CurveEaseInOut, 
        () => {
            SourceViewController.View.Transform = CGAffineTransform.MakeScale(0.05f, 0.05f);
            SourceViewController.View.Center = this.TargetPoint;
        },
        () => {
            DestinationViewController.View.RemoveFromSuperview();
            SourceViewController.DismissViewController(false, null);                    
        });
}

Matchingo Now Available on Windows Phone and Kindle Fire

Matchingo running on a Nokia WP8 device

I am super excited to say that Matchingo is now available in all major mobile app stores including the Windows Phone Store and the Amazon App Store! With these latest two releases, Matchingo now spans a majority of phone and tablet devices in use today. As best I can tell, Matchingo is the first memory matching game to accomplish this feat!

It's hard to believe that it's been nearly 5 years since I originally created Matchingo using Silverlight. This new reincarnation of Matchingo benefits from the awesome Unity engine, but still leverages some of that same C# code written way back then.

Please go grab Matchingo now at Matchingo.com and leave a nice review - I'd really appreciate it!

continue reading the blog >>