Program flow through a message and back

Back in the days of coding Atari ST I was fairly familiar with what was really going on in the processor after I compiled and ran my code.  I knew that it was running sequentially. And if I jumped or branched off to a subroutine, I knew that it was run that and then return.  It was an event based system with a menu bar… one of the first.. but still it was a main program loop that waited for events and then acted on them, running the code to act on them, and then return to the main loop and wait for the next event.

But today with multi-code processors and multi-threaded code, I have to admit that half the time I don’t really know much about what’s really happening in the compiled code from a program flow standpoint.  Does it sometimes run down two threads of code at the same time?  I sort of assume that it does at times.  But I don’t really know. Continue reading

Posted in iOS

Table Views – the missing guide

TableViews in iOS is like coding 101 – it should be one of the first things that you learn. Lots of apps use table views, including many of the built in apps in the iPhone. Nonetheless I’ve been struggling with them for a week and spent a good few weeks before that avoiding this task all together.  And in my debugging and trying to figure out how to do the exact thing I want to do with a table view, I’ve found that the necessary information is spread out all over the docs and some of it is just not there.

I think one reason for the lack of detailed documentation is that tableviews are one of the basic views of iOS and as such there’s almost an endless list of things that can be done with them.  But I don’t want to do any of those things.  I want to make a basic table that pops up in my app as an options or settings view.  It needs to have a DONE button and it needs to drill down to allow option selection in the same way that the Settings app does in the iPhone.

So I might as well provide some of the answers here, if for no other reason, so I can reference back to it later the next time I want to do this.  This is another long post so buckle up… Continue reading

Posted in iOS

Xcode 4 problems

The time has come to upgrade to iOS 4.3 and Xcode 4.  Grrr.  The main problem I was having I could not find anywhere on google or in the dev forums, so I thought I should post my problem and fix here (after the jump) to hopefully help the next guy.

In general I suppose I resist change.  But for iOS app development I also sortof fear change because it means having to learn something new, and historically this is a time-suck of anywhere from a few nights to a week or so.  Of course Apple has to keep releasing new features, improving old features, adding capabilities, etc.  This is required to maintain their number one spot in the marketplace.  So, I get why it has to happen. But being a one man development shop, any time some new os is released it means I’m the only one to update everything to support the latest software.  What I fear the most is any new product release from apple.  Well, actually I’m torn on this because as an apple consumer /slash/ fanboy, I want new stuff.  But as a developer who has to support the new stuff, I fear it.  For example, if Apple were to add a retina display to the iPad and double the pixel resolution… it would throw me into a tailspin.  Supporting such a high resolution iPad would mean redoing a lot of my graphics.  I could skip it, but the key to success in the app store is being among the first to support the new features that Apple is pushing. So I’d have no choice but to dig in and do it as fast as possible.

Anyway, here I am a couple of days into trying to use Xcode 4 and iOS 4.3.  I’m not sure which of those two updates is causing the problems, but I’ve been battling it…

Continue reading

Posted in iOS

What cloud are you living on?

I was going to write this cool post on how much I hate those Microsoft “To The Cloud” commercials because they’re about on the same level as the kinds of magical technology that’s found in tv shows and movies..  where hackers type on a computer real fast for a second and are then logged in to a government supercomputer where they can magically open locked doors, change people’s police records, or tap into cameras.  But two problems, one is that someone sort of beat me to the punch, and two is that some of it is sort of possible – even though the commercial is very misleading on many levels.

Still, these commercials are crazy fake. The one that gets my goat the worst is the one that shows a bored couple sitting in an airport, and after the announcer tells them they’re in for even longer wait, the husband says “To The Cloud” and suddenly they are logged into their computer at home, looking for shows that were recorded so they can watch them over the net from the laptop in the airport.  Speaking as someone who actually has a setup that would allow me to do this.. the facts in the ad are complete poppycock!

Continue reading

Long Live Physical Media

Wanting physical media to die is valiant. But the fact is that BluRay is a very convenient way to store the huge chunks of data that is high def movies. Think of this.. if you only rent movies via netflix or apple tv.. you’re never going to get a high quality bandwidth stream. Even watching movies on HD TV is a low bandwidth stream. With current compression technologies (mp4) a good quality stream takes no less than 20 and more like 25 to 30 mps. The best network connection available at my house is pulling down about 20 megs, which isn’t quite enough.. and that’s a burst speed. Sustained, especially if everyone in my neighborhood was doing it simultaneously on a ‘friday movie night’, wouldn’t provide instant access or even same night access. Even when a connection in my modern city gets significantly faster (years and years from now) the connection in less modern cities won’t yet.

Lower bandwidth steams.. like a sub- 5 mps stream of a 720p apple tv rental.. actually looks pretty good. And it’s fine for a lot of viewing.. including sitcoms, kids shows, animation.. but what about when I want to watch the next big action movie like Inception or Batman. I want to see that in real 1920 hd, high bandwidth 1080p. Otherwise why even buy a 1080p tv? If all you’re gonna watch is youtube videos blown up to full screen.. why not just buy a 720p tv?

Continue reading

Using After Effects for iPhone Game Animation Paths

My first post here and the title is really long.  Whatever!

I needed to create some smooth mostly preset animation paths for an iPhone game.  I didn’t want them to be completely random, I wanted to control the general feel of the motion.  But I also wanted it to have a random feel and not be exactly the same each time you see it.  So here’s how I did it, using After Effects and Microsoft Excel.

Continue reading

Posted in iOS