Slide over and split view in iPad simulator

拜拜、爱过 提交于 2020-12-28 09:59:46

问题


iOS 9 introduced slide over and split view for iPad. How do I simulate these features on an iPad simulator? I have tried swiping from right on iPad Air 2 simulator with no luck.


回答1:


To simulate slide over: drag from the right edge (starting from a point very close to the edge).

To simulate split view: tap on the small white bar on the left edge of the slide-over app.

See this WWDC video.

EDIT (Thanks to @qix, @Bogdan Weidmann, @Solomon)

Supported devices:

  • iPad Air+, Mini 2+ for slide over

  • iPad Air 2, Mini 4, Pro for both slide over & split view

Project requirements:

  • Built with iOS 9+ SDK

  • Supports all device orientations

  • Use launch storyboards




回答2:


I found that dragging from the right in the simulator didn't work for me (in XCode 9.2).

Instead I had to run my app. Then slide up from the bottom, to get the Dock. Then pressing and holding on Safari, I could drag the icon to the right hand side of the screen. The screen responded, and I could let go. The simulator re-arranged to show a split view.




回答3:


In Xcode 11 if you cannot activate the swipe from the right or bottom edge, enable device bezels. You can then begin swiping from just over the edge of the bezel. Whereas without bezels you would end up resizing the window.




回答4:


Doing it the first time, I'll tell youy that the steps need to be done meticulously correct. Otherwise it won't work.

  1. See the bezel: Simulator >> Window >> Show Device Bezels
  2. Open an app you want
  3. See the docker: Tap the the bottom center of the bezel and pull it up.
  4. Drag the other app you like from the docker but don't let go of your finger until you completely pull it to the edge of the screen and you see your iPad showing a nice split view. If you let go too quick then the app would just show on top of the other. It won't be a split view.

Keep pulling til the edge. Don't let go yet, otherwise it wont Safari won't split the screen, it would just float over your app...

This is good:




回答5:


I tried this one

defaults write com.apple.iphonesimulator AllowFullscreenMode -bool YES

and it worked for me

the reference was: https://www.youtube.com/watch?v=YFPUgQpUmuE




回答6:


if you're on Xcode 11 and still not able to get it to work make sure your project doesn't require full screen.

To verify go to your Target settings > General tab > Requires full screen and disable it.

Also I noticed that you've to start dragging from the black border of the iPad Pro simulator in order to get it to work. hope this helps someone.




回答7:


You can drag & drop the App from docker to your App like this:

A picture is worth a thousand words See the gif here: https://imgur.com/eulv6Wb



来源:https://stackoverflow.com/questions/30912631/slide-over-and-split-view-in-ipad-simulator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!