ShareKit/ShareKit — pull request #135 by ConfusedVorlon (2011-12-16 11:05:21+00:00)
Title: Simplify modal view controller dismiss

no need to wrestle for whether the parent is in parentviewcontroller or presentingViewController
just send the dismiss to the presented view controller and it will forward appropriately:

from apple docs:
'If you call this method on the modal view controller itself, however, the modal view controller automatically forwards the message to its parent view controller.'

tested on iOS4 & 5