Drag-and-Drop Implementation for Mobile Apps
We, as mobile developers, know: dragging elements looks like a simple animation, but it hides complex coordination—gesture detection, visual copy, hit-testing drop zones, model updates, and return animation. Each step is a potential bug. Our team has 5+ years of experience implementing drag-and-drop on iOS, Android, and Flutter. We have solved dozens of issues with cell indexing, auto-scroll, and haptic feedback. We offer turnkey implementation: from design to store publication. Order development—get a stable solution with a 6-month warranty.
Comparison of Implementation Across Platforms
| Platform |
API / Library |
Complexity |
Dev Time (simple reorder) |
| iOS (UIKit) |
UIDragInteraction, UIDropInteraction |
Medium |
2–3 days |
| iOS (SwiftUI) |
.draggable(), .dropDestination() |
Low |
1–2 days |
| Android (View) |
startDragAndDrop(), setOnDragListener() |
Medium |
2–4 days |
| Android (Compose) |
Modifier.dragAndDropSource(), dragAndDropTarget() |
Medium |
2–3 days |
| Flutter |
Draggable, DragTarget, ReorderableListView |
Medium |
3–5 days |
Native implementation on iOS using UIDragInteraction is 2x faster than a custom Flutter solution when working with large lists.
iOS: UIKit and SwiftUI
Since iOS 11, Apple provides a built-in Drag & Drop API via UIDragInteraction and UIDropInteraction. UIDragInteraction is added to the source view, UIDropInteraction to the target view. Data is transferred through NSItemProvider—a universal container for any data type.
let dragInteraction = UIDragInteraction(delegate: self)
view.addInteraction(dragInteraction)
The key delegate method dragInteraction(_:itemsForBeginning:) must return [UIDragItem] with NSItemProvider. For internal drag & drop, you can pass any object via localObject—it is not serialized and is available instantly.
For UICollectionView and UITableView, there are specialized delegates with methods like collectionView(_:itemsForBeginningDragSession:at:). Built-in reorder support through collectionView(_:moveItemAt:to:)—no need to manually manage animation.
Problems with UICollectionView drag. When dragging, the collection automatically creates a snapshot of the cell. If the cell contains AVPlayerLayer or custom CALayer animations, the snapshot looks frozen. Solution: override dragPreviewParametersForItemAt: and return UIDragPreviewParameters with a custom visiblePath.
In SwiftUI—.draggable() and .dropDestination() since iOS 16. Data must conform to the Transferable protocol. For custom types, implement Transferable via CodableRepresentation or DataRepresentation. This reduces code volume by 30% compared to UIKit.
Android: View and Compose
On Android, View.startDragAndDrop() (API 24+). DragShadowBuilder creates a shadow—override onDrawShadow() for a custom appearance. View.setOnDragListener() on the target handles events: ACTION_DRAG_ENTERED, ACTION_DRAG_EXITED, ACTION_DROP, ACTION_DRAG_ENDED.
In Jetpack Compose—Modifier.dragAndDropSource {} and Modifier.dragAndDropTarget {} since Compose 1.5. DragAndDropTransferData with ClipData as a container. For reorder inside LazyColumn, use the compose-reorderable library.
Flutter: Widgets and Reorder
Flutter offers Draggable<T> and DragTarget<T>. Draggable creates childWhenDragging (placeholder) and feedback (widget under the finger). DragTarget.onWillAcceptWithDetails() for validation, onAcceptWithDetails() for handling.
For list reordering, use ReorderableListView. onReorder receives oldIndex and newIndex. Important bug: when newIndex > oldIndex, subtract 1 before list.insert(). The documentation mentions this, but developers often miss it.
How to Ensure Auto-Scroll During Drag?
When the user drags an element to the edge of the list, the list should scroll. In UIKit—UIScrollView auto-scroll triggers when within 50pt of the edge. In Flutter—combine DragTarget with ScrollController.animateTo() on onWillAccept when the cursor is within 80px of the edge. This is standard practice but requires precise tuning.
Why Is Haptic Feedback Important During Drag?
Haptic feedback at the start of the drag gives the user a sense of "grasping" the object. On iOS, use UIFeedbackGenerator.impactOccurred() when longPressGestureRecognizer.state == .began. Without haptic feedback, drag feels "weightless," degrading UX. On Android—HapticFeedbackConstants.LONG_PRESS.
Common Problems and Solutions
| Problem |
Solution |
Platform |
| Snapshot frozen |
Override dragPreviewParameters |
iOS |
| Index drift during fast drag |
Update dataSource synchronously with animation |
All |
| No auto-scroll |
Add edge proximity detection and scrolling |
iOS, Flutter |
| Cancel without animation |
Use onDraggableCanceled() with Velocity |
Flutter |
Model Data State
When reordering, update the dataSource synchronously with the animation, not after. Otherwise, fast consecutive drags cause index drift. This is a common mistake leading to bugs.
What’s Included in Drag-and-Drop Implementation
- UX analysis and prototyping (if needed)
- Native or cross-platform API integration
- Custom animation and haptic feedback
- Auto-scroll handling and cancel animation
- Testing on real devices (iOS/Android)
- Integration documentation and 1-month support
- App Store or Google Play submission (optional)
How to Implement Drag-and-Drop on iOS: Step-by-Step
- Add
UIDragInteraction to the source view and implement the delegate.
- Add
UIDropInteraction to the target view and implement the delegate.
- Configure
NSItemProvider for data transfer.
- Handle
sessionDidUpdate for visual feedback.
- Implement cancel return animation (default is present).
Timelines and Cost
Timelines depend on complexity: simple list reorder—2–3 days, system with multiple zones and animations—5–7 days. Cost is calculated individually. Our company has completed 30+ projects with drag-and-drop. Get a consultation—we estimate your project in 1 day.
Quality Guarantee
We guarantee stable functionality on all target devices. We provide a conformity certificate (if required). Contact us—we implement drag-and-drop turnkey.
UX/UI Design for Mobile Apps: Why a Figma Layout Doesn't Guarantee a Ready Interface
A designer sends a layout—beautiful, with gradients and custom components. The developer opens it and realizes: the button is 36pt, the tap target is 20pt. On an iPhone SE, it's physically impossible to press with a thumb. The bottom sheet covers content when the keyboard appears. Navigation is built against the native iOS model. Apple will reject the app, or users will leave within a week—depending on how lucky you get with the review.
We have been designing mobile UX/UI for over 5 years and have seen hundreds of such situations. During this time, we have designed and helped launch 30+ mobile apps—from fintech products to social networks. You don't need to guess whether the design will pass App Review or Google Play—we embed platform requirements from the first screen. We'll assess your project in one day, contact us.
Mobile UX/UI is not an adaptation of web design. It is a separate discipline with specific platform constraints: safe area, touch gestures, UIViewController lifecycle, Activity state management.
Why Can't You Ignore Human Interface Guidelines and Material Design 3?
Apple HIG and Google Material Design 3 are not aesthetic recommendations. They are documented user expectations formed by years of using system applications. Expectations confirmed by user experience research on mobile platforms (User experience design).
HIG defines: minimum tap target 44×44 pt, safe area insets for notch and Dynamic Island, standard gestures (swipe back on iOS, back gesture on Android 10+). Ignoring safe area is a common mistake. safeAreaLayoutGuide in UIKit and safeAreaPadding in SwiftUI exist precisely for this. A designer who doesn't set safe area margins in Figma guarantees a bug during development.
Material Design 3 introduced Dynamic Color—the color scheme is generated from the user's wallpaper via MaterialTheme.colorScheme in Jetpack Compose. An app that ignores dynamic colors on Android 12+ looks out of place. This is not critical for niche products but is noticeable in mass-market apps.
The most painful platform guideline inconsistencies we encounter on projects:
- Custom navigation on top of system navigation. iOS users expect swipe back from any point on the left edge of the screen. A custom
NavigationController without interactive gesture breaks this. Android users expect the system back button—a custom back button in the left corner does not fully replace it.
- Modal windows instead of navigation push. Bottom sheets are appropriate for actions, not for navigating content.
- Missing haptic feedback.
UIImpactFeedbackGenerator on iOS is not decoration but part of the interface response. Buttons, swipes, and confirmation actions without tactile feedback feel broken.
Table: Comparison of iOS and Android UX/UI Requirements
| Parameter |
iOS (HIG) |
Android (Material Design 3) |
| Minimum tap target |
44×44 pt |
48×48 dp |
| Safe area |
safeAreaLayoutGuide / safeAreaPadding |
Insets in WindowInsets |
| Back gesture |
Swipe from left edge |
System back gesture (Android 10+) |
| Color scheme |
System dark/light |
Dynamic Color from wallpaper |
| Typography |
San Francisco (Dynamic Type) |
Roboto (Material Type Scale) |
| Haptic feedback |
UIImpactFeedbackGenerator |
HapticFeedbackConstants (Compose) |
How to Get the Most Out of Figma?
The Figma Variables API has changed the workflow. Design tokens—colors, typography, radii, spacing—are stored as variables and exported directly to code via figma-tokens or style-dictionary. This eliminates manual value transfer and desynchronization between design and implementation. Practice shows: Figma Variables speeds up asset handoff to development by 2–3 times compared to static frames, and using design tokens reduces code transfer errors by 60%.
Auto Layout with wrap and spacing between elements allows building components that behave like flex containers. A developer opens a component and sees not a static artifact but a description of behavior at different content sizes.
Component Properties—variants, boolean toggles, instance swaps—enable building a full design system right in Figma. A button with 4 states (default, hover, pressed, disabled), 3 sizes, and 2 icon variants is one component, not 24 frames.
Figma Prototype with Variables allows creating an interactive prototype with real state: showing how the screen changes with different variable values. This is no longer just a "clickable layout" but a full UX testing tool.
How to Benefit from Prototyping and UX Testing Before Development?
The most expensive mistake in a mobile product is to develop a feature, release it, and discover that users don't understand how it works. A Figma prototype at the testing stage costs zero development hours. Redoing a finished screen costs days. Testing a prototype before development begins reduces the number of fixes by 80%.
For usability testing, we use Maze (task testing on a prototype—the user goes through a scenario, we get heatmaps and mis-click rates) or direct sessions via UserTesting. Key metrics are task completion rate and time on task, not "like/dislike."
A/B testing on mobile is harder than on web: the App Store doesn't allow UI changes without an app update. Therefore, it's important to test hypotheses on a prototype before release, not through production experiments. According to research, fixing a bug found on a prototype costs 10 times less than after production release. And average task completion time increases by 40% after proper UX optimization during prototyping.
Why Are Animations Critical for Interface Perception?
Animations in mobile apps are feedback. An element doesn't appear instantly—it transitions to the desired state over 200–350 ms. This gives the brain context to understand what happened.
- iOS:
withAnimation in SwiftUI, UIViewPropertyAnimator in UIKit for interactive animations with interruption capabilities. Spring animations with dampingRatio are the basis of most Apple system transitions.
- Android:
AnimatedVisibility, animateContentSize, Crossfade in Compose. MotionLayout for complex scenes with multiple transformations.
- Flutter:
AnimationController + Tween, Hero animations between screens, Lottie for After Effects exports. Lottie is especially effective for onboarding illustrations and empty states.
The key constraint is 16 ms per frame (60 fps) or 8 ms (120 fps on ProMotion devices). Animations must run on the GPU via CALayer/RenderThread, not on the CPU via layoutSubviews. Profiling via Core Animation instrument in Xcode is a mandatory step before releasing animated screens.
Why Is Accessibility Not an Optional Feature?
VoiceOver on iOS and TalkBack on Android are used by up to 15% of users—this statistic is confirmed by accessibility research described in Accessibility (Wikipedia). In absolute numbers for a large app, this is thousands of people. Additionally, App Store rejections due to accessibility occur, though rarely.
Minimum checklist:
- All interactive elements have
accessibilityLabel
- Text contrast ratio at least 4.5:1 (WCAG AA)
- Dynamic Type is supported—the interface doesn't break at maximum font size
- VoiceOver focus flows through the screen in a logical order
SwiftUI automatically generates an accessibility tree from component semantics. UIKit requires manual setup of accessibilityTraits, accessibilityHint, and grouping via shouldGroupAccessibilityChildren.
What Does the Work Include?
The UX/UI design deliverables include:
| Deliverable |
Description |
| User flows and wireframes |
Screen structure and user paths |
| Design system |
Design tokens, components, Style Dictionary for export |
| UI layouts (Figma) |
All screens following platform guidelines |
| Interactive prototype |
Prototype with variables and animations |
| Development specification |
Zeplin / Figma Dev Mode with dimensions, margins, states |
| Maintenance guide |
Recommendations for adding new screens and components |
What Is the Process and Timeline?
Design goes through stages: research and competitive analysis → user flows and wireframes → design system → UI layouts → prototype → testing → handoff to development.
Timeline estimates:
| Scope |
Timeline |
| Redesign of 3–5 screens |
1–2 weeks |
| MVP (10–15 screens) |
3–5 weeks |
| Full product (30+ screens) |
6–10 weeks |
The project scope and timeline are determined after analyzing your requirements—number of screens, component complexity, whether a design system is needed or we work with an existing one. Get a consultation for your project—contact us for a preliminary assessment. Order a complete mobile app design—we'll assess your project in one day and propose the optimal work scope.