简体   繁体   English

iOS 模拟器 - 从 Finder 中拖动图像而不是在 Xcode 10 中添加到照片

[英]iOS Simulator - Dragging images from Finder Not Adding to Photos in Xcode 10

Just installed macOS Mojave and Xcode 10. I'm trying to drag images from Finder onto the Simulator to add them to Photos, which was working the day before on High Sierra and Xcode 9.刚刚安装了 macOS Mojave 和 Xcode 10。我试图将图像从 Finder 拖到模拟器上以将它们添加到照片中,这在前一天在 High Sierra 和 Xcode 9 上工作。

Does anyone know if Apple has changed / blocked this or if there is another solution to get local images into Photos?有谁知道 Apple 是否已更改/阻止了这一点,或者是否有其他解决方案可以将本地图像放入照片中?

As of Version 10.1 (SimulatorApp-877 CoreSimulator-581.2) , I found what works for now.Version 10.1 (SimulatorApp-877 CoreSimulator-581.2) ,我找到了目前有效的方法。 For some reason keeping the Finder window in the background and keeping the simulator window in the foreground while dragging and dropping the photo into Photos app works.出于某种原因,在将照片拖放到照片应用程序中时,将 Finder 窗口保持在后台并将模拟器窗口保持在前台。 Selecting multiple photos does not work since trying to do that brings the Finder into foreground.选择多张照片不起作用,因为尝试这样做会将 Finder 置于前台。

在此处输入图片说明

Make sure your Finder stays in the background and, no, selecting multiple images does not seem to work no matter what I have tried.确保您的Finder保持在后台,不,无论我尝试过什么,选择多个图像似乎都不起作用。

I hope this helps!我希望这有帮助!

Just hold the image to Photos icon and drop it, this will help you.只需将图像放在“照片”图标上并将其放下,这将对您有所帮助。

-Drag a photo - 拖动照片

在此处输入图片说明

Result:-结果:- 在此处输入图片说明

For some reason, you have to hold the image you're dragging over the Simulator window for a few seconds (specifically, until the window gets into focus and the little plus symbol next to the cursor disappears).出于某种原因,您必须将拖动到模拟器窗口上的图像保持几秒钟(特别是,直到窗口进入焦点并且光标旁边的小加号消失)。 This might be a bug in Xcode 10.这可能是 Xcode 10 中的一个错误。

拖放功能在 XCode 12 中运行良好。如果它不适合您,请尝试退出并重新打开模拟器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM