30

I have a scroll view and and an embed UIImageView. Code is right but I can not scroll in the Simulator likely because I have a trackpad, not a mouse. Or can I?

Frank
  • 497
  • 1
  • 6
  • 11
  • Should be able to. How do you know "Code is right"? Post some code dude. :) – Almo Jan 30 '14 at 20:38
  • I made an outlet of UIScrollView called "scrollView" Than I have _scrollView.scrollEnabled = YES; _scrollView.contentSize = CGSizeMake(320, 2000); – Frank Jan 30 '14 at 20:58
  • Duplicate of http://stackoverflow.com/questions/13275832/how-to-mimic-two-finger-scroll-drag-gesture-on-ios-simulator, which has more (and more complete) answers – henry Jul 08 '16 at 03:22

7 Answers7

28

You need to enable 3 finger drag:

  1. From the Apple menu, choose System Preferences.
  2. Click the Accessibility icon
  3. Select Pointer Control in the sidebar
  4. Click the Trackpad Options button
  5. Place a checkmark next to "Enable dragging"
  6. From the related pop-up menu, choose “three finger drag” so there's a checkmark next to it
  7. Click OK

https://support.apple.com/en-us/HT204609

Boschman
  • 825
  • 1
  • 10
  • 17
mechsuitcat
  • 389
  • 3
  • 2
  • 3
    It would be great if the Simulator had a mode that just capture motions from the trackpad like it does with the keyboard. – Mycroft Canner Jul 17 '21 at 15:51
22

You can click the trackpad and drag (as other folks have said), or if you have "Three finger drag" enabled in Trackpad preferences, you can scroll with three fingers.

Here's a guide to all of the gestures in the simulator: iOS Simulator User Guide

Cheddar
  • 974
  • 5
  • 9
16

You need to click and hold to scroll.

TotoroTotoro
  • 17,524
  • 4
  • 45
  • 76
5

Answer for 2021, macOS 11.6

Enabling 3 finger drag settings was changed in recent versions,

  1. Choose Apple menu  > System Preferences, then click Accessibility.
  2. Select Pointer Control in the sidebar. (In earlier versions of macOS, select Mouse & Trackpad.)
  3. Click the Trackpad Options button.
  4. Select ”Enable dragging,” then choose ”three finger drag” from the menu.
  5. Click OK.

guidemac3fingure

Source: https://support.apple.com/en-us/HT204609

majurageerthan
  • 2,169
  • 3
  • 17
  • 30
1

With Xcode 13 you can also enable Capture Pointer in the toolbar or using ^ + CMD + K when using an iPad Simulator.

3ps
  • 109
  • 5
0

When you left click is like when you touch the Screen, so click and scroll

Carioni
  • 673
  • 2
  • 8
  • 19
0

If someone else is having issues scrolling (especially on horizontal scrollviews for some reason), It seems like the "force touch" of the trackpad is pretty sensitive and for some reason it seems to interrupt the scrolling, I disabled "Use Trackpad force" on the simulator in Hardware/Touch Pressure, now scrolling always works properly.

iVentis
  • 993
  • 6
  • 19