How to overload the back button of a UITableViewController


Finally a technical post!

I was doing an iPhone assignment the other day where I am creating a simple FTP directory listing app. The problem was that I could change views during an FTP call (asynchronous) by hitting the back button, but the request would continue and then break my app with an “EXC_BAD_ACCESS” error. So I wanted to be able to run code on that back button press to stop FTP request.

However, this is not a simple thing to find out how to do! Some people on StackOverflow suggested putting in a custom back button with a selector pointing to a function, but the new button didn’t look as nice as the default one and lost the naming features. But then I came across this http://stackoverflow.com/a/1816682 which suggests to use viewWillDisappear. I kill the FTP connection in this function (if its currently running) and now everything is peachy!

- (void)viewWillDisappear:(BOOL)animated {
NSArray *viewControllers = self.navigationController.viewControllers;
if ([viewControllers indexOfObject:self] == NSNotFound) {
if (self.activityIndicator.hidden == NO){
[self stopReceiveWithStatus:@"Cancelled"];
}

NSLog(@"View controller was popped");
}
}

iPhoneFTP

App Review: Mental Calculation2 Minus


I have often been told that I exceed at math, especially when it comes to mental calculations. I was excited, then, to be able to approach my mathematical Achilles’ heel: subtraction. For whatever reason, addition has always made more sense. Although in all fairness, I don’t think many would say that they prefer subtraction, so much that they add by subtracting a negative value.

It is with this background that I approached Mental Calculation2 Minus (free), the latest in a series of math tools created by tatsuya itoh.

The app is relatively simple in layout and design, simply choose the number of questions you want to answer and then how many digits in the minuend and the subtrahend (I had to Google that, I do numbers not words!). This gives a range of 20-100 questions and 1-1 to 99-99.

Mental Calculation2 Minus gameplay

The gameplay involves a rapid-fire style questioning system, but with a catch: the next equation is somewhat visible behind the current. This information is not much help when you are trying to figure out 75-38, but it can certainly help to increase speed when solving 7-5.

The rounds are timed, and lend themselves well to online leaderboards. Fortunately Itoh has one for each combination and they are already hotly contested. I am proud of my current stance of 15.45 seconds for 20 questions, putting me at 9 of 222 players.

As this is a free app, it is not surprising that there is minor advertising. However, this is limited to a small bar on the bottom of the home screen which links to the developer’s page in the App store.

For anyone looking to brush up on there subtractions, or people looking for something in the vain of the math portion of Brain Age on DS,  Mental Calculation2 Minus (free) is an easy recommendation.

Ski Safari Review (because my blog is having an identity crisis)


I was going to write a literary masterpiece, but then I got distracted playing Ski Safari on my iPad. I was going to write something for the good of mankind; instead I have spent 5+ hours this week riding penguins and doing back-flips.

As this is my first iPad game review, I did not receive it for free*. Was this game worth my hard-earned $0.99? Yes.

The first thought I had when playing Ski Safari was that it was similar to Jetpack Joyride, and not just because of the same price point. They are both 2D scrollers where the main objective is lasting as long as possible.

While other review sites are siding with Jetpack, I find I keep coming pack to the powdery white safari. As I am reviewing Ski Safari, I will now stop talking about other games.

Ski Safari is a relatively simple game to play; only one finger is needed to control it. In addition, the game is quite pretty and has always run buttery-smooth.

On the other hand, the catchy music could definitely use the help of an additional track, if only to help me from whistling the song whenever I’m not playing.

In conclusion, Ski Safari is a great little game. It is more forgiving than the competition, and is thus a great choice for casual casual gamers.

Click here to buy Ski Safari on iTunes

*If any developer would like to send me a download code for their game, I will guarantee a review on my blog. Whether I like your game will be determined in as much of an impartial experience as possible.

Poll Time: The First is About iPods


I don’t personally own an iPod (yes I’m one of those people), but I know that I never use my  Zune since I got an iPad or smartphone. Why did I make this specifically about iPods? Probably because everyone knows what I mean when I say iPod, as opposed to the confusion caused by other DAPs (Digital Audio Players) in general.