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.

Word Scramble Little Books

The best word scramble game on iPhone, iPad, and Android devices. Unscramble thousands of jumbled words with simple touch gameplay to expand your vocabulary and word recognition.

Word Search Little Books

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

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.

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

Mapping with Xamarin Talk

Today I am giving a presentation on mapping with Xamarin.Android, Xamarin.iOS, and Xamarin.Forms as part of the Virtual Xamarin Users Group. In this talk I cover the basics of working with Google Maps, MapKit, as well as the Xamarin.Forms.Map control.

I have also put up a GitHub repo that includes the sample code used in today's talk. You can find that here:
SmartyP GitHub - Xamarin Mapping Sample Apps.

Thanks to everyone who attended today!

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);                    
        });
}
continue reading the blog >>