User:Nicolas17/MobileMail/MessageViewController/previewActionForSwipeAction:withMessage:forSwipe:: Difference between revisions

From iPhone Development Wiki
(Created page with "''Note: This method is actually called ''<code>-[MessageViewController _previewActionForSwipeAction:withMessage:forSwipe]</code>'', but underscores cannot be used in wiki page...")
 
(Add more introductory info)
Line 1: Line 1:
''Note: This method is actually called ''<code>-[MessageViewController _previewActionForSwipeAction:withMessage:forSwipe]</code>'', but underscores cannot be used in wiki page names.''
<div class="dablink">This method is actually called ''<code>-[MessageViewController _previewActionForSwipeAction:withMessage:forSwipe]</code>'', but underscores cannot be used in wiki page names.</div>


''Everything in this page is preliminary, may be wrong.''
-(UIPreviewAction*)_previewActionForSwipeAction:(unsigned long long)action withMessage:(id)message forSwipe:(BOOL)swipe;


This method in <code>MessageViewController</code> creates a {{sdklink|UIKit|UIPreviewAction}} object for the given action. The action is an integer, I haven't yet figured out what each value means.
This method in <code>MessageViewController</code> creates a {{sdklink|UIKit|UIPreviewAction}} object (action shown in the 3D Touch "peek" view).
It's called by <code>leadingPreviewAction</code> and <code>trailingPreviewAction</code> to get the actions on the sides of the peek, and by <code>_previewActionsForSwipeActions:excludingSwipeActions:</code> for the actions at the bottom.
 
This method contains two jump tables (at least in arm64), presumably compiled from <tt>switch</tt> statements, which Hopper doesn't handle automatically even in the disassembly, and it's a bit of a pain to figure them out manually.

Revision as of 20:25, 14 February 2016

-(UIPreviewAction*)_previewActionForSwipeAction:(unsigned long long)action withMessage:(id)message forSwipe:(BOOL)swipe;

This method in MessageViewController creates a UIPreviewAction object (action shown in the 3D Touch "peek" view). It's called by leadingPreviewAction and trailingPreviewAction to get the actions on the sides of the peek, and by _previewActionsForSwipeActions:excludingSwipeActions: for the actions at the bottom.

This method contains two jump tables (at least in arm64), presumably compiled from switch statements, which Hopper doesn't handle automatically even in the disassembly, and it's a bit of a pain to figure them out manually.