Tag Archives: objective-c

Using a UITextField like an ATM keypad.

A small snippet of code that uses a UITextField like an ATM keypad. E.g. You start typing in a sequence like this: £0.00 -> £0.02 -> £0.20 -> £2.05 -> £20.50 Elsewhere define and store a reference to a NSNumberFormatter … Continue reading

Posted in Programming | Tagged , , , , | 2 Comments

Wow it’s been sometime huh? Here’s a brief rundown…

It’s all been rather hectic. Lots has been happening and unhappening. The most obvious being that the box that runs this website went a bit mental as the hard disks succumbed to age; and I’ve been too busy to fix … Continue reading

Posted in Art, Chef's Book, Computer, Cooking, Drawing, Exercise, Games, Literature, Miscellany, Music, Photography, Programming | Tagged , , , , , , , | Leave a comment

Progress with adding iCloud to Chef’s Book.

There are some interesting challenges with incorporating iCloud support, especially into an existing application. One, which I’ve been working through, is that you can no longer copy in a pre-existing store for the purposes of loading data. Such a move … Continue reading

Posted in Chef's Book, Programming | Tagged , , , , , , | 15 Comments

Whilst deciding what to include with the App, we write a PDF generator!

Managed to implement rendering of recipes into multipage PDF documents. They look something like this: Lasagne Recipe One thing to note whilst writing the code was the usual inverted co-ordinates. I wanted an image in the top left, title and … Continue reading

Posted in Programming | Tagged , , , , | Leave a comment

Nearing release, implement shiny things whilst waiting.

As the project nears release my thoughts turn to what will be needed in the near future and how best to solve an intermittent bug that’s present now. The bug was resolving by doing something I should have done ages … Continue reading

Posted in Programming | Tagged , , , , , , | Leave a comment

One problem with objects being so closely tied to the underlying DB in Core Data.

Why does the following code throw an exception and immediately sig kill on the second iteration at [e nextObject]: for (NSManagedObject *current in categories) { if ([lowercaseName isEqualToString:[current.name lowercaseString]] && category != current ) { // Move all the recipes. … Continue reading

Posted in Programming | Tagged , | Leave a comment

iPad rotation problems, an update.

So having created a separate test app which does not exhibit the problem I ported some of that code into my app which then starts to exhibit the issue I conclude that the problem lies within the view containing the … Continue reading

Posted in Programming | Tagged , , , | Leave a comment

Following on from dynamic clocks.

It would also be nice to draw multiple clocks if one is ‘full’ it starts another. This example draws and returns a maximum of three clocks but always returns a 90×30 image: – (UIImage *)drawClocks:(NSNumber *)time { UIImage *image; int … Continue reading

Posted in Programming | Tagged , , , , , , | Leave a comment

Drawing little clock icons dynamically.

It’s kind of nice to be able to dynamically draw little ‘clock’ time icons. This function returns a UIImage of 30×30 pixels containing such an image: static inline float radians(double degrees) { return (degrees * M_PI) / 180; } – … Continue reading

Posted in Programming | Tagged , , , , , , | 1 Comment

So so close.

Just two bugs away, probably, from having something working in its entirety. E.g. everything else is additional features rather than core functionality. Current bugs: 1 – Render of StepTableCell is outside the bounds of the cell for reasons unknown, it’s … Continue reading

Posted in Programming | Tagged , , | Leave a comment