Lifecards 1.5 released
by jegeblad
Lifecards 1.5 got released yesterday. It took exactly 7 days for Apple to approve the update. Most of the time the updates are approved within a couple of days. I guess the review team is busy.
Besides all the features that came along with Strip Designer (stickers, cutouts, iPad support, auto font-sizing, etc.), there are three major new features: Undo/Redo, "multipage" cards, and hand-writing.
Undo/Redo was horrible to implement. Lifecards was never designed with that in mind, so it was put on top of the existing code base. The implementation isn't pretty; Each user content object consists of two types of data; settings and current state. Settings data reflect the settings the user has applied to the object and the current state contains cached data, like the current texture id for photos/stickers and the balloon path for balloons (things that can be rebuild). The setting data is pushed onto the undo-stack at specific points in the code. Undoing an action means that you have to restore the settings of the specific object and rebuild all cached data. It sounds straight-forward, but since the objects were not built with the cache/setting division in mind, it looks a bit messy in places. For future projects I'll think about undo/redo from day one. It would have been easier if that part of the code was also more clearly divided between model and view, but when you build iPhone apps you don't want to overcomplicate things from the beginning.
I actually planned undo/redo for the last two releases of SD, but decided to disable it about 2 days before both releases. In both cases because I didn't felt like I had the time to test it properly and finish the last remaining bits. I didn't cut it because it wasn't stable. I cut it because I wasn't sure it was stable. When you start to see your planned deadline slip 5-7 days it is time to cut features.
Multipage was added to better support backs of postcards and the inner side of a greeting card. When I started multipage (after the last release of SD) I was very ambitious. I wanted to have the ability to create photo books. Each page can have its own independent template. However, I realized that having multiple pages visible at once presents a lot of issues when you can drag e.g. balloons from one page to another. While most of the code for multipage documents is there, I decided to simplify everything for this release to avoid introducing too many bugs. So the current code is limited to having all pages visible at the same time. People are begging for SD to become multipage, so I may have to get everything working properly soon. I am still divided between building on top of the current code-base or starting over.
Handwriting was also added to enable you to draw a signature. It is a funny little feature. The drawings are stored in vector format -- Basically a set of paths, with pen width and color data. That way they don't take up too much space and they render nicely in PDFs. Unfortunately, erasing parts of vector paths is somewhat tricky. I implemented a small algorithm that removes anything that intersects with a line of some width (the eraser). Basically, given a path and a convex polygon (made from the line and its width), I can remove those parts of the path that intersects the polygon. There are still a few glitches in the algorithm, but I decided it was stable enough to release.
I think the keywords of this release were "priority" and "good-enough". Some planned features didn't make it into the release, and some are just barely implemented "well enough". The whole update took about 21 days and the deadline slipped about 5 days -- That is a lot of underestimation considering I didn't finish everything I planned for, but at least it got out.
05/21/10 11:38:47 am,