Wednesday, August 26, 2009

Integrated Social Media Tool For the iPhone?

More and more, I'm getting closer to finishing my first iPhone app, which, hopefully, will find its way into the App Store. As I get more and more adept at using the iPhone SDK, I'm beginning to wonder what other apps I could build. The two current apps I'm building I'm keeping it secret what they're for, but there is one idea I am going to put out there before I've written a line of code...

What About an Integrated Social Media Tool For the iPhone?
Currently there is a Facebook app, various Twitter apps, etc.,etc.,etc! Robert Scoble spends allot of time talking about trying to integrate all his data, to integrate all his feeds, etc.

If this could be done on the iPhone, how would you do it? I mean, we don't want some kludgy monstrosity here!

Would the tool just be a way of dispersing our own data quickly to multiple channels? Or would it also include a way of keeping track of all your favorite feeds possibly in real-time?

Give me some feedback people! I'm keen to hear what you have to say! And Robert, if you read this, tell me, what would your social media dream app look like running on the iPhone?

Tuesday, August 11, 2009

Clarification on beginUpdates and endUpdates methods

As I was doing some studying regarding different aspects of working with a UITableView, I came across some information about beginUpdates and endUpdates, which, I hope to share with you to clarify how these guys actually work!

The SDK gives you several methods (of your table view) you can call to animate the addition and deletion of rows/sections on your table:

Animating the adding of a row:
-(void)insertRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation *)animation;

Deleting of a row:
-(void)deleteRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation *)animation;

Adding a section:
-(void)insertSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation *)animation;

Deleting a section:
-(void)deleteSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation *)animation;

Calling a combination of these to say add a row in one spot and delete another row in another spot will generate two different animations in the order that you specified them.

To make things look better, there is beginUpdates and endUpdates. The beginUpdates and endUpdates is basically like a two-phased commit you do on a database... only for animation! If you wrap your sequence of adds/deletes with these guys it will animate the deletions and inserts all as one orchestrated animation! Giving you that professional polished look!

I found some interesting table view code you may want to look at out on the web that uses allot of this. NOTE: I haven't actually tested this code yet so I don't know how well it will actually work.

Monday, August 10, 2009

Some Sort of Auto-Caching of Views

In the iPhone App that I am currently working on, I've got a nice (i) button in the lower right hand corner of each regular view of my application. Tapping on that button causes an info screen to flip into view as one might expect for an App. Basically providing a splash screen including showing the user the current version of the app and a link to the app's web site.

The crazy thing is, that when you tap on the button for the first time during the run of the app (at least in most cases), there is a slight delay and the view appears: BAM! And the nice flip animation either only partially appears or does not appear at all. If it does appear, it kind of shudders in an unprofessional way.

This problem isn't a deal-breaker per-say. I mean, the info screen does come up. No exceptions are generated. And, if you tap on an info button after that during the same run, the animation shows up just fine. It just doesn't have that consistent professional look that I think it should have.

My best guess is that there is some caching of view data, or view controller data going on and something asyncronous going on, so, that it brings up the view the first time before the animation gets a chance to completely run. Of course it is a guess.

Right now, I have separate code in each view controller that happens when the user taps the (i) info button that instantiates an object from the infoViewController class, sets the animation, and calls the proper method to bring up a modal view.

I am thinking now of doing this in my root view controller (with the exception of calling the method to bring it up, assign it to a property, and just call the modal view method whenever I need to. I'm abit lazy, so we shall see if I get to it. My guess is that doing it would make sure that when the user taps on the (i) button the first time and every time afterwards, the info screen will always animate nicely.

Have you run into anything like this?

Thursday, August 6, 2009

Pause/Play clicker on iPhone Headset Wire

You probably already know this, but I share it anyways...
Have you ever been listening to your tunes on your iPhone through the ear buds that came with the phone, and you squeezed the little clicker on the wire to pause the playing of your music, and the music continued playing merrily along?

You clicked it again, and still it played on?

I discovered today, that it is possible to have your headset plugged in far enough to hear your music just fine, but not far enough for the "clicker" to work.

Solution? Just push the plug in a little farther and try again!