

How does the Twitter iPhone app implement side swiping on a table? - boctor
http://idevrecipes.com/?p=281

======
jazzychad
argh, this isn't quite how the menu is implemented in tweetie. the tweet menu
starts out _underneath_ the tweet itself and the swipe causes the tweet to
slide _over_ the menu and out of the way.

The way they explain it, the tweet menu also slides in/out from offscreen with
the tweet itself.

The difference is not really significant, but the effect is a bit different.
I'm guessing the menu view just lives underneath of the tweet view in the
table cell from the beginning, but i'm not completely sure.

tweetie's tweet menu also has a neat animation effect by having each menu
button "pop" a little (zoom in and out quickly) as it is revealed when the
tweet is sliding out of the way. subtle, but neat. then the tweet view
"bounces" as it hits the left side wall as it slides back in.

not bashing the article, it is very informative; but the implementation in
tweetie was very well thought out and is a bit more complicated than it lets
on.

there is, however, a bug in tweetie with these menus. if you slide a tweet out
and then slide it back in by touching somewhere else, you cannot slide the
tweet out again until you somehow reload the view (e.g. by tapping on a tweet
to view details then popping back out to the timeline).

~~~
boctor
Chad, thanks for the feedback.

I was already planning to do the popping of each menu button in a follow up
post.

You're right about the menu appearing underneath the tweet. Luckily doing it
that way is just as easy as having them animate together. I'll look at
modifying the code to handle both animation styles.

The bounce is already implemented in the current code.

I agree with you that Tweetie's implementation is well thought out. The goal
is to have a 100% faithful recreation that is indistinguishable from the
original

~~~
jazzychad
ah yes, i see the bounce code now. i was half way through reading the source
when you replied :) good on ya.

i was searching for a resource that explained exactly this swipe menu
technique for an app i just submitted, so i'm glad there finally is one for
others to use as well.

again, great post. looking forward to the follow ups! i really dig your blog,
btw. very helpful and clear. i just happened to have spent _a lot_ of time
with tweetie and its nuances since i modeled a bunch of UI effects it has into
the Notifo app.

~~~
boctor
Chad, the code now puts the menu behind the cell and only animates the cell in
and out while leaving the menu at x offset 0. Thanks for pointing this out!

------
aaronbrethorst
Check out JBSlidingTableViewCell:
[http://cocoacontrols.com/platforms/ios/controls/jbslidingtab...](http://cocoacontrols.com/platforms/ios/controls/jbslidingtableviewcell)

