{"id":343357,"date":"2022-12-30T15:00:23","date_gmt":"2022-12-30T15:00:23","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=343357"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=343357","title":{"rendered":"<span>\u041a\u0430\u043a \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 SwiftUI \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0432 dropDestination \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 Transferable \u0442\u0438\u043f\u043e\u0432?<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/64f\/35d\/fb2\/64f35dfb27fb9cec419fc58361030f9f.gif\" alt=\"EmojiArt -  \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Drag &amp; Drop \u0438\u0437 \u0421\u0442\u044d\u043d\u0444\u043e\u0440\u0434\u0441\u043a\u043e\u0433\u043e \u043a\u0443\u0440\u0441\u0430\" title=\"EmojiArt -  \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Drag &amp; Drop \u0438\u0437 \u0421\u0442\u044d\u043d\u0444\u043e\u0440\u0434\u0441\u043a\u043e\u0433\u043e \u043a\u0443\u0440\u0441\u0430\" width=\"594\" height=\"452\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/64f\/35d\/fb2\/64f35dfb27fb9cec419fc58361030f9f.gif\"\/><figcaption>EmojiArt &#8212;  \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Drag &amp; Drop \u0438\u0437 \u0421\u0442\u044d\u043d\u0444\u043e\u0440\u0434\u0441\u043a\u043e\u0433\u043e \u043a\u0443\u0440\u0441\u0430<\/figcaption><\/figure>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u00a0<code>Transferable<\/code><strong>\u00a0<\/strong>\u0431\u044b\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043d\u0430\u00a0<a href=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2022\/10062\/\" rel=\"noopener noreferrer nofollow\"><strong>WWDC 2022<\/strong><\/a>\u00a0\u0438 \u043f\u0440\u0438\u0437\u0432\u0430\u043d \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0443\u0441\u0438\u043b\u0438\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0441 \u043d\u0430\u0448\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0434\u043b\u044f \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0438 (<strong>Copy &amp; Paste<\/strong>), a \u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u043d\u0438\u0435 \u0438 \u201c\u0441\u0431\u0440\u043e\u0441\u0430\u201d (<strong>Drag &amp; Drop<\/strong>) \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p>\u041e\u043d \u043f\u0440\u0438\u0448\u0435\u043b \u043d\u0430 \u0437\u0430\u043c\u0435\u043d\u0443 \u043a\u043b\u0430\u0441\u0441\u0443\u00a0<code>NSItemProvider<\/code>\u00a0\u0432 iOS 16+, macOS 13+ (Ventura \u0438 \u043d\u043e\u0432\u0435\u0435), watchOS 9.0+ \u0438 tvOS 16+. \u041f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u00a0\u00a0<code>Transferable<\/code><strong>\u00a0<\/strong>\u043c\u043e\u0436\u043d\u043e \u0432 \u043f\u043e\u0441\u0442\u0430\u0445\u00a0<a href=\"https:\/\/bestkora.com\/IosDeveloper\/protokol-transferable-menyaet-pravila-igry-dlya-drag-drop-v-swiftui\/\" rel=\"noopener noreferrer nofollow\"><strong>\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b Transferable \u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u0433\u0440\u044b \u0434\u043b\u044f Drag &amp; Drop \u0432 SwiftUI\u00a0<\/strong><\/a>\u0438\u00a0<a href=\"https:\/\/bestkora.com\/IosDeveloper\/protokol-transferable-v-swiftui-peredacha-alternativnogo-kontenta-s-pomoshhyu-proxyrepresentation\/\" rel=\"noopener noreferrer nofollow\"><strong>\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b Transferable \u0432 SwiftUI \u2014 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ProxyRepresentation<\/strong><\/a>. (\u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044b, \u0442\u0430\u043c \u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b).<\/p>\n<h2>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/h2>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u00a0\u00a0<code>Transferable<\/code><strong>\u00a0<\/strong>\u0432 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435\u00a0<strong><em>EmojiArt<\/em><\/strong>\u00a0\u0438\u0437\u00a0\u00a0<a href=\"https:\/\/cs193p.sites.stanford.edu\/\" rel=\"noopener noreferrer nofollow\"><strong>\u043a\u0443\u0440\u0441\u0430 CS193P \u0421\u0442\u044d\u043d\u0444\u043e\u0440\u0434\u0441\u043a\u043e\u0433\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0430, \u0412\u0435\u0441\u043d\u0430 2021 (\u041b\u0435\u043a\u0446\u0438\u044f 9. Drag &amp;Drop)<\/strong><\/a>\u00a0\u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u00a0<code>class\u00a0NSItemProvider<\/code>\u00a0\u043d\u0430 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u00a0<code>Transferable<\/code>\u00a0\u043f\u0440\u0438\u0432\u0435\u043b\u0430 \u043a \u0432\u043e\u043f\u0440\u043e\u0441\u0443 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u00a0\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u201c\u0441\u0431\u0440\u043e\u0441\u201d (<strong>Drop<\/strong>) \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445\u00a0<code>Transferable<\/code>\u0422\u0418\u041f\u043e\u0432 \u0432 \u043e\u0434\u0438\u043d \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440.<\/p>\n<p>\u0412 \u0442\u0430\u043a\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0442\u044c \u0438 &#171;\u0431\u0440\u043e\u0441\u0430\u0442\u044c&#187; (<strong>Drag &amp; Drop<\/strong>) \u0441\u0442\u0440\u043e\u043a\u0443\u00a0<code>String<\/code>,\u00a0<code>URL<\/code>-\u0430\u0434\u0440\u0435\u0441 \u0438\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435\u00a0<code>Data<\/code>\u00a0(\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f) \u0432 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435\u00a0<code>ZStack<\/code>. \u0418 \u0434\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u00a0\u00a0<code>Transferable<\/code><strong>\u00a0<\/strong>\u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0430\u0441\u0441\u0430\u00a0<code>class<\/code>\u00a0<code>NSItemProvider<\/code>\u0438\u00a0<code>View<\/code><strong> <\/strong>\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u00a0<code>.onDrop<\/code>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d67\/201\/899\/d67201899eb0412735696169c9e1911f.png\" alt=\"\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 NSItemProvider \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432\" title=\"\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 NSItemProvider \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432\" width=\"1300\" height=\"1172\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d67\/201\/899\/d67201899eb0412735696169c9e1911f.png\"\/><figcaption>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 NSItemProvider \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/figcaption><\/figure>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u00a0<code>Transferable<\/code><strong>\u00a0<\/strong>\u0438 \u043d\u043e\u0432\u043e\u0433\u043e\u00a0<code>View<\/code>\u00a0\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u00a0<code>.dropDestination (for: action: isTargeted:);<\/code> \u0435\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u00a0<code>for<\/code>\u00a0\u043d\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0422\u0418\u041f\u043e\u0432 &#171;\u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0445&#187; \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e, \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u044b\u0448\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439\u00a0<code>View<\/code><strong>\u00a0<\/strong>\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u00a0<code>.onDrop (of: [.plainText, .url, .image] ...). <\/code><\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0430\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0440\u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u00a0<code>.dropDestination<\/code>\u00a0\u0441 \u0442\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0422\u0418\u041f\u0430\u043c\u0438:\u00a0<code>String.self<\/code>,\u00a0<code>URL.self<\/code>\u0438\u00a0<code>Data.self<\/code>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b14\/5b0\/6c5\/b145b06c5d9b77c848219a32dcf3dea4.png\" alt=\"\u0422\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 .dropDestination\" title=\"\u0422\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 .dropDestination\" width=\"1320\" height=\"1270\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b14\/5b0\/6c5\/b145b06c5d9b77c848219a32dcf3dea4.png\"\/><figcaption>\u0422\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 .dropDestination<\/figcaption><\/figure>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u044f &#171;\u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u044e&#187;\u00a0<code>String<\/code>, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u044e \u0437\u0435\u043b\u0435\u043d\u044b\u0439 \u0437\u043d\u0430\u0447\u043e\u043a\u00a0<code>+<\/code>, \u043a\u0430\u043a \u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c, \u0438 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043d\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e. \u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u044f \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u044e\u00a0<code>URL<\/code>\u00a0\u0438\u043b\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u00a0<code>Data<\/code>, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0432\u0442\u043e\u0440\u043e\u043c\u0443 \u0438 \u0442\u0440\u0435\u0442\u044c\u0435\u043c\u0443 \u0422\u0418\u041f\u0430\u043c, \u044f \u0432\u0438\u0436\u0443 \u0437\u043d\u0430\u0447\u043e\u043a \u043d\u0430 \u0437\u0430\u043f\u0440\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u043d\u0438\u044f. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432\u00a0<code>.dropDestination<\/code><strong>\u00a0<\/strong>\u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041d\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u201c\u0441\u0431\u0440\u043e\u0441\u201d \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0422\u0418\u041f\u043e\u0432\u00a0 \u0432 \u043e\u0434\u043d\u043e\u043c\u00a0<code>.dropDestination<\/code>, \u0435\u0441\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435\u00a0<code>enumDropItem<\/code>\u00a0\u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0422\u0418\u041f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u201c\u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c\u201d:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/54e\/006\/17a\/54e00617aebd06f401cb3fe78d155599.png\" alt=\"\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 enum DropItem \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0422\u0418\u041f\u043e\u0432 &quot;\u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0445&quot; \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432\" title=\"\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 enum DropItem \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0422\u0418\u041f\u043e\u0432 &quot;\u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0445&quot; \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432\" width=\"1180\" height=\"1336\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/54e\/006\/17a\/54e00617aebd06f401cb3fe78d155599.png\"\/><figcaption>\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 enum DropItem \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0422\u0418\u041f\u043e\u0432 &#171;\u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0445&#187; \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/figcaption><\/figure>\n<p>\u041f\u0440\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u00a0\u00a0<code>Transferable<\/code><strong>\u00a0<\/strong>\u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u00a0<code>ProxyRepresentation<\/code>\u00a0\u0432 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u00a0<code>static<\/code>\u00a0\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435\u00a0<code>transferRepresentation<\/code>\u00a0\u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439\u00a0<strong>UTI<\/strong>\u00a0\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u00a0<code>extension<\/code>\u00a0\u043a\u043b\u0430\u0441\u0441\u0430\u00a0<code>UTType<\/code>.<\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0432 \u043d\u0430\u0448\u0435\u043c\u00a0<code>ZStack<\/code>\u00a0\u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u043c \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0443\u00a0<code>.dropDestination<\/code>, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0422\u0418\u041f\u0430\u00a0<code>DropItem.self<\/code>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c39\/489\/6ac\/c394896acb00ab34cef38f7484840459.png\" alt=\"\u041c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 .dropDestination \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043e\u0434\u043d\u043e\u0433\u043e \u0422\u0418\u041f\u0430 DropItem\" title=\"\u041c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 .dropDestination \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043e\u0434\u043d\u043e\u0433\u043e \u0422\u0418\u041f\u0430 DropItem\" width=\"1354\" height=\"946\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c39\/489\/6ac\/c394896acb00ab34cef38f7484840459.png\"\/><figcaption>\u041c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 .dropDestination \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043e\u0434\u043d\u043e\u0433\u043e \u0422\u0418\u041f\u0430 DropItem<\/figcaption><\/figure>\n<p>\u0410 \u0432\u043d\u0443\u0442\u0440\u0438 <code>.dropDestination<\/code><strong>\u00a0<\/strong>\u043c\u044b \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 (<code>case<\/code>) \u0438\u043c\u0435\u0435\u0442 \u043c\u0435\u0441\u0442\u043e \u043f\u0440\u0438 &#171;\u0441\u0431\u0440\u043e\u0441\u0435&#187;:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a40\/490\/f81\/a40490f816603cbde02f6fde096aa8f6.png\" alt=\"\u0412\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 .dropDestination \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0441 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c\u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f DropItem\" title=\"\u0412\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 .dropDestination \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0441 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c\u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f DropItem\" width=\"1264\" height=\"1100\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a40\/490\/f81\/a40490f816603cbde02f6fde096aa8f6.png\"\/><figcaption>\u0412\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 .dropDestination \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0441 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c\u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f DropItem<\/figcaption><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435\u0441\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438\u00a0<strong>iOS 16+<\/strong>, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u00a0<code>extension<\/code><strong> <\/strong>\u043c\u0430\u0441\u0441\u0438\u0432\u0430\u00a0<code>Array<\/code>\u00a0c\u00a0<code>NSProvider<\/code>\u00a0\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0432 \u043d\u0430\u0448\u0435 \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u043e\u0440\u00a0<a href=\"https:\/\/cs193p.sites.stanford.edu\/\" rel=\"noopener noreferrer nofollow\"><strong>\u041f\u043e\u043b \u0425\u044d\u0433\u0435\u0440\u0442\u0438 \u0438\u0437 \u0421\u0442\u044d\u043d\u0444\u043e\u0440\u0434\u0430<\/strong><\/a><strong>\u00a0<\/strong>\u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u043c\u00a0<code>NSItemProvider<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0438 \u043a\u043b\u0430\u0441\u0441\u00a0<code>NSItemProvider<\/code>\u00a0\u043d\u0430\u00a0 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u00a0<code>Transferable<\/code>. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u043d\u0438\u0436\u0435\u00a0<strong>iOS 16<\/strong>, \u0442\u043e \u044d\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u00a0<code>extension<\/code><strong> <\/strong>\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0437\u0430\u043c\u0435\u043d\u0438\u043c\u044b\u043c \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0442\u0430\u043a\u0438\u043c \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c, \u043a\u0430\u043a\u00a0<code>class\u00a0NSItemProvider<\/code>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/318\/577\/2d5\/3185772d5036f595e100ba14dbd0ca4b.png\" alt=\"\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 extension \u043a\u043b\u0430\u0441\u0441\u0430 class NSItemProvider\" title=\"\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 extension \u043a\u043b\u0430\u0441\u0441\u0430 class NSItemProvider\" width=\"1180\" height=\"1368\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/318\/577\/2d5\/3185772d5036f595e100ba14dbd0ca4b.png\"\/><figcaption>\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 extension \u043a\u043b\u0430\u0441\u0441\u0430 class NSItemProvider<\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u044d\u043c\u043e\u0434\u0436\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c \u0438 &#171;\u0431\u0440\u043e\u0441\u0430\u0435\u043c&#187; (<strong>Drag &amp; Drop<\/strong>) \u043d\u0430 \u043d\u0430\u0448\u0443 &#171;\u043a\u0430\u0440\u0442\u0438\u043d\u0443&#187; \u043d\u0435 \u043e\u0442\u043a\u0443\u0434\u0430-\u0442\u043e \u0438\u0437\u0432\u043d\u0435, \u0430 \u0441 \u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0430\u043b\u0438\u0442\u0440 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c\u00a0<code>View<\/code>\u00a0\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u00a0<code>.onDrag<\/code>, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f\u00a0<code>NSItemProvider<\/code>, \u043d\u0430\u00a0<strong>View<\/strong>\u00a0\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u00a0<code>.draggable()<\/code>, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f\u00a0<code>Transferable<\/code><strong> <\/strong>\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/264\/9e6\/851\/2649e685134ea746e2cdc7aa07cb1f9e.png\" alt=\"\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 draggable()\" title=\"\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 draggable()\" width=\"1352\" height=\"586\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/264\/9e6\/851\/2649e685134ea746e2cdc7aa07cb1f9e.png\"\/><figcaption>\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 draggable()<\/figcaption><\/figure>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u00a0<code>enum\u00a0DropItem<\/code>, \u043a\u0443\u0434\u0430 \u043c\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b (\u0442\u0435\u043a\u0441\u0442\u00a0<code>String<\/code>,\u00a0<code>URL<\/code>-\u0430\u0434\u0440\u0435\u0441, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430\u00a0<code>Data<\/code>), \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0432\u00a0<code>SwiftUI<\/code>\u00a0\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u00a0<code>Transferable<\/code><strong> <\/strong>\u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u043d\u0438\u0435 \u0438 &#171;\u0441\u0431\u0440\u043e\u0441&#187; (<strong>Drag &amp; Drop<\/strong>) \u0432 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e\u00a0<code>ZStack<\/code>, \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439). \u041f\u0440\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u00a0<code>Transferable<\/code>\u00a0\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435\u00a0<code>enum\u00a0DropItem<\/code><strong>\u00a0<\/strong>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432 \u00a0<code>static<\/code>\u00a0\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435\u00a0<code>transferRepresentation<\/code>\u00a0<code>ProxyRepresentation<\/code>\u00a0\u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e &#171;\u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e&#187; \u0422\u0418\u041f\u0430.<\/p>\n<p>\u041a\u043e\u0434 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430<strong>\u00a0<\/strong><a href=\"https:\/\/github.com\/BestKora\/Transferable\" rel=\"noopener noreferrer nofollow\"><strong>Github.com<\/strong><\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/708676\/\"> https:\/\/habr.com\/ru\/post\/708676\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption>EmojiArt &#8212;  \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Drag &amp; Drop \u0438\u0437 \u0421\u0442\u044d\u043d\u0444\u043e\u0440\u0434\u0441\u043a\u043e\u0433\u043e \u043a\u0443\u0440\u0441\u0430<\/figcaption><\/figure>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u00a0<code>Transferable<\/code><strong>\u00a0<\/strong>\u0431\u044b\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043d\u0430\u00a0<a href=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2022\/10062\/\" rel=\"noopener noreferrer nofollow\"><strong>WWDC 2022<\/strong><\/a>\u00a0\u0438 \u043f\u0440\u0438\u0437\u0432\u0430\u043d \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0443\u0441\u0438\u043b\u0438\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0441 \u043d\u0430\u0448\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0434\u043b\u044f \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0438 (<strong>Copy &amp; Paste<\/strong>), a \u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u043d\u0438\u0435 \u0438 \u201c\u0441\u0431\u0440\u043e\u0441\u0430\u201d (<strong>Drag &amp; Drop<\/strong>) \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p>\u041e\u043d \u043f\u0440\u0438\u0448\u0435\u043b \u043d\u0430 \u0437\u0430\u043c\u0435\u043d\u0443 \u043a\u043b\u0430\u0441\u0441\u0443\u00a0<code>NSItemProvider<\/code>\u00a0\u0432 iOS 16+, macOS 13+ (Ventura \u0438 \u043d\u043e\u0432\u0435\u0435), watchOS 9.0+ \u0438 tvOS 16+. \u041f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u00a0\u00a0<code>Transferable<\/code><strong>\u00a0<\/strong>\u043c\u043e\u0436\u043d\u043e \u0432 \u043f\u043e\u0441\u0442\u0430\u0445\u00a0<a href=\"https:\/\/bestkora.com\/IosDeveloper\/protokol-transferable-menyaet-pravila-igry-dlya-drag-drop-v-swiftui\/\" rel=\"noopener noreferrer nofollow\"><strong>\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b Transferable \u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u0433\u0440\u044b \u0434\u043b\u044f Drag &amp; Drop \u0432 SwiftUI\u00a0<\/strong><\/a>\u0438\u00a0<a href=\"https:\/\/bestkora.com\/IosDeveloper\/protokol-transferable-v-swiftui-peredacha-alternativnogo-kontenta-s-pomoshhyu-proxyrepresentation\/\" rel=\"noopener noreferrer nofollow\"><strong>\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b Transferable \u0432 SwiftUI \u2014 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ProxyRepresentation<\/strong><\/a>. (\u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044b, \u0442\u0430\u043c \u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b).<\/p>\n<h2>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/h2>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u00a0\u00a0<code>Transferable<\/code><strong>\u00a0<\/strong>\u0432 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435\u00a0<strong><em>EmojiArt<\/em><\/strong>\u00a0\u0438\u0437\u00a0\u00a0<a href=\"https:\/\/cs193p.sites.stanford.edu\/\" rel=\"noopener noreferrer nofollow\"><strong>\u043a\u0443\u0440\u0441\u0430 CS193P \u0421\u0442\u044d\u043d\u0444\u043e\u0440\u0434\u0441\u043a\u043e\u0433\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0430, \u0412\u0435\u0441\u043d\u0430 2021 (\u041b\u0435\u043a\u0446\u0438\u044f 9. Drag &amp;Drop)<\/strong><\/a>\u00a0\u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u00a0<code>class\u00a0NSItemProvider<\/code>\u00a0\u043d\u0430 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u00a0<code>Transferable<\/code>\u00a0\u043f\u0440\u0438\u0432\u0435\u043b\u0430 \u043a \u0432\u043e\u043f\u0440\u043e\u0441\u0443 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u00a0\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u201c\u0441\u0431\u0440\u043e\u0441\u201d (<strong>Drop<\/strong>) \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445\u00a0<code>Transferable<\/code>\u0422\u0418\u041f\u043e\u0432 \u0432 \u043e\u0434\u0438\u043d \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440.<\/p>\n<p>\u0412 \u0442\u0430\u043a\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0442\u044c \u0438 &#171;\u0431\u0440\u043e\u0441\u0430\u0442\u044c&#187; (<strong>Drag &amp; Drop<\/strong>) \u0441\u0442\u0440\u043e\u043a\u0443\u00a0<code>String<\/code>,\u00a0<code>URL<\/code>-\u0430\u0434\u0440\u0435\u0441 \u0438\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435\u00a0<code>Data<\/code>\u00a0(\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f) \u0432 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435\u00a0<code>ZStack<\/code>. \u0418 \u0434\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u00a0\u00a0<code>Transferable<\/code><strong>\u00a0<\/strong>\u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0430\u0441\u0441\u0430\u00a0<code>class<\/code>\u00a0<code>NSItemProvider<\/code>\u0438\u00a0<code>View<\/code><strong> <\/strong>\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u00a0<code>.onDrop<\/code>:<\/p>\n<figure class=\"full-width\"><figcaption>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 NSItemProvider \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/figcaption><\/figure>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u00a0<code>Transferable<\/code><strong>\u00a0<\/strong>\u0438 \u043d\u043e\u0432\u043e\u0433\u043e\u00a0<code>View<\/code>\u00a0\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u00a0<code>.dropDestination (for: action: isTargeted:);<\/code> \u0435\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u00a0<code>for<\/code>\u00a0\u043d\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0422\u0418\u041f\u043e\u0432 &#171;\u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0445&#187; \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e, \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u044b\u0448\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439\u00a0<code>View<\/code><strong>\u00a0<\/strong>\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u00a0<code>.onDrop (of: [.plainText, .url, .image] ...). <\/code><\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0430\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0440\u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u00a0<code>.dropDestination<\/code>\u00a0\u0441 \u0442\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0422\u0418\u041f\u0430\u043c\u0438:\u00a0<code>String.self<\/code>,\u00a0<code>URL.self<\/code>\u0438\u00a0<code>Data.self<\/code>:<\/p>\n<figure class=\"full-width\"><figcaption>\u0422\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 .dropDestination<\/figcaption><\/figure>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u044f &#171;\u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u044e&#187;\u00a0<code>String<\/code>, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u044e \u0437\u0435\u043b\u0435\u043d\u044b\u0439 \u0437\u043d\u0430\u0447\u043e\u043a\u00a0<code>+<\/code>, \u043a\u0430\u043a \u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c, \u0438 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043d\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e. \u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u044f \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u044e\u00a0<code>URL<\/code>\u00a0\u0438\u043b\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u00a0<code>Data<\/code>, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0432\u0442\u043e\u0440\u043e\u043c\u0443 \u0438 \u0442\u0440\u0435\u0442\u044c\u0435\u043c\u0443 \u0422\u0418\u041f\u0430\u043c, \u044f \u0432\u0438\u0436\u0443 \u0437\u043d\u0430\u0447\u043e\u043a \u043d\u0430 \u0437\u0430\u043f\u0440\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u043d\u0438\u044f. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432\u00a0<code>.dropDestination<\/code><strong>\u00a0<\/strong>\u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041d\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u201c\u0441\u0431\u0440\u043e\u0441\u201d \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0422\u0418\u041f\u043e\u0432\u00a0 \u0432 \u043e\u0434\u043d\u043e\u043c\u00a0<code>.dropDestination<\/code>, \u0435\u0441\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435\u00a0<code>enumDropItem<\/code>\u00a0\u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0422\u0418\u041f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u201c\u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c\u201d:<\/p>\n<figure class=\"full-width\"><figcaption>\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 enum DropItem \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0422\u0418\u041f\u043e\u0432 &#171;\u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0445&#187; \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/figcaption><\/figure>\n<p>\u041f\u0440\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u00a0\u00a0<code>Transferable<\/code><strong>\u00a0<\/strong>\u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u00a0<code>ProxyRepresentation<\/code>\u00a0\u0432 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u00a0<code>static<\/code>\u00a0\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435\u00a0<code>transferRepresentation<\/code>\u00a0\u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439\u00a0<strong>UTI<\/strong>\u00a0\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u00a0<code>extension<\/code>\u00a0\u043a\u043b\u0430\u0441\u0441\u0430\u00a0<code>UTType<\/code>.<\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0432 \u043d\u0430\u0448\u0435\u043c\u00a0<code>ZStack<\/code>\u00a0\u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u043c \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0443\u00a0<code>.dropDestination<\/code>, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0422\u0418\u041f\u0430\u00a0<code>DropItem.self<\/code>:<\/p>\n<figure class=\"full-width\"><figcaption>\u041c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 .dropDestination \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043e\u0434\u043d\u043e\u0433\u043e \u0422\u0418\u041f\u0430 DropItem<\/figcaption><\/figure>\n<p>\u0410 \u0432\u043d\u0443\u0442\u0440\u0438 <code>.dropDestination<\/code><strong>\u00a0<\/strong>\u043c\u044b \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 (<code>case<\/code>) \u0438\u043c\u0435\u0435\u0442 \u043c\u0435\u0441\u0442\u043e \u043f\u0440\u0438 &#171;\u0441\u0431\u0440\u043e\u0441\u0435&#187;:<\/p>\n<figure class=\"full-width\"><figcaption>\u0412\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 .dropDestination \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0441 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c\u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f DropItem<\/figcaption><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435\u0441\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438\u00a0<strong>iOS 16+<\/strong>, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u00a0<code>extension<\/code><strong> <\/strong>\u043c\u0430\u0441\u0441\u0438\u0432\u0430\u00a0<code>Array<\/code>\u00a0c\u00a0<code>NSProvider<\/code>\u00a0\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0432 \u043d\u0430\u0448\u0435 \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u043e\u0440\u00a0<a href=\"https:\/\/cs193p.sites.stanford.edu\/\" rel=\"noopener noreferrer nofollow\"><strong>\u041f\u043e\u043b \u0425\u044d\u0433\u0435\u0440\u0442\u0438 \u0438\u0437 \u0421\u0442\u044d\u043d\u0444\u043e\u0440\u0434\u0430<\/strong><\/a><strong>\u00a0<\/strong>\u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u043c\u00a0<code>NSItemProvider<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0438 \u043a\u043b\u0430\u0441\u0441\u00a0<code>NSItemProvider<\/code>\u00a0\u043d\u0430\u00a0 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u00a0<code>Transferable<\/code>. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u043d\u0438\u0436\u0435\u00a0<strong>iOS 16<\/strong>, \u0442\u043e \u044d\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u00a0<code>extension<\/code><strong> <\/strong>\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0437\u0430\u043c\u0435\u043d\u0438\u043c\u044b\u043c \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0442\u0430\u043a\u0438\u043c \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c, \u043a\u0430\u043a\u00a0<code>class\u00a0NSItemProvider<\/code>.<\/p>\n<figure class=\"full-width\"><figcaption>\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 extension \u043a\u043b\u0430\u0441\u0441\u0430 class NSItemProvider<\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u044d\u043c\u043e\u0434\u0436\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c \u0438 &#171;\u0431\u0440\u043e\u0441\u0430\u0435\u043c&#187; (<strong>Drag &amp; Drop<\/strong>) \u043d\u0430 \u043d\u0430\u0448\u0443 &#171;\u043a\u0430\u0440\u0442\u0438\u043d\u0443&#187; \u043d\u0435 \u043e\u0442\u043a\u0443\u0434\u0430-\u0442\u043e \u0438\u0437\u0432\u043d\u0435, \u0430 \u0441 \u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0430\u043b\u0438\u0442\u0440 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c\u00a0<code>View<\/code>\u00a0\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u00a0<code>.onDrag<\/code>, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f\u00a0<code>NSItemProvider<\/code>, \u043d\u0430\u00a0<strong>View<\/strong>\u00a0\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u00a0<code>.draggable()<\/code>, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f\u00a0<code>Transferable<\/code><strong> <\/strong>\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432:<\/p>\n<figure class=\"full-width\"><figcaption>\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 draggable()<\/figcaption><\/figure>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u00a0<code>enum\u00a0DropItem<\/code>, \u043a\u0443\u0434\u0430 \u043c\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b (\u0442\u0435\u043a\u0441\u0442\u00a0<code>String<\/code>,\u00a0<code>URL<\/code>-\u0430\u0434\u0440\u0435\u0441, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430\u00a0<code>Data<\/code>), \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0432\u00a0<code>SwiftUI<\/code>\u00a0\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u00a0<code>Transferable<\/code><strong> <\/strong>\u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u043d\u0438\u0435 \u0438 &#171;\u0441\u0431\u0440\u043e\u0441&#187; (<strong>Drag &amp; Drop<\/strong>) \u0432 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e\u00a0<code>ZStack<\/code>, \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439). \u041f\u0440\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u00a0<code>Transferable<\/code>\u00a0\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435\u00a0<code>enum\u00a0DropItem<\/code><strong>\u00a0<\/strong>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432 \u00a0<code>static<\/code>\u00a0\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435\u00a0<code>transferRepresentation<\/code>\u00a0<code>ProxyRepresentation<\/code>\u00a0\u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e &#171;\u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e&#187; \u0422\u0418\u041f\u0430.<\/p>\n<p>\u041a\u043e\u0434 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430<strong>\u00a0<\/strong><a href=\"https:\/\/github.com\/BestKora\/Transferable\" rel=\"noopener noreferrer nofollow\"><strong>Github.com<\/strong><\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/708676\/\"> https:\/\/habr.com\/ru\/post\/708676\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-343357","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/343357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=343357"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/343357\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=343357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=343357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=343357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}