{"id":867,"date":"2018-12-23T16:12:00","date_gmt":"2018-12-23T16:12:00","guid":{"rendered":"https:\/\/www.bestkora.com\/SwiftLearning\/?p=867"},"modified":"2019-02-07T07:16:11","modified_gmt":"2019-02-07T07:16:11","slug":"adding-playgrounds-to-xcode-projects","status":"publish","type":"post","link":"https:\/\/www.bestkora.com\/SwiftLearning\/adding-playgrounds-to-xcode-projects\/","title":{"rendered":"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 Playgrounds \u043a Xcode \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c."},"content":{"rendered":"<p><span style=\"font-weight: 400;\"><strong>Playgrounds<\/strong> &#8211; \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438\u0434\u0435\u0438, \u043d\u043e \u044f, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0438\u0445 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e. \u0418\u0437 \u043d\u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u044c\u043e\u043d\u043e\u0432, \u0435\u0441\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0432\u0430\u0448\u0438 <strong>Xcode<\/strong> \u043f\u0440\u043e\u0435\u043a\u0442\u044b. \u042f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043b\u044e\u0431\u043b\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 <strong>Playground<\/strong>\u00a0&#8220;\u0436\u0438\u0432\u044b\u0435 \u00a0View&#8221; (<strong>Live View<\/strong>) \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 <strong>view<\/strong> \u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0439 (<strong>layout<\/strong>) <strong>UI<\/strong> \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0431\u0435\u0433\u0430\u0442\u044c \u043a \u0443\u0441\u043b\u0443\u0433\u0430\u043c <strong>Interface Builder<\/strong>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, <strong>Playground<\/strong>\u00a0\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u0434\u0443 \u0438 \u00a0\u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0412\u043f\u0435\u0440\u0432\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u043e, \u0442\u0430\u043a \u0447\u0442\u043e \u00a0\u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0448\u0430\u0433\u0430\u043c.<\/span><\/p>\n<p><!--more--><\/p>\n<h1 id=\"creating-a-custom-view\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e View<\/h1>\n<p><span style=\"font-weight: 400;\">\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u0442\u044c \u0432\u0430\u043c \u0438\u0434\u0435\u044e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f, \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 <strong>Xcode<\/strong> \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <strong>GridView<\/strong>, \u0432 \u043e\u0441\u043d\u043e\u0432\u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0448\u0430\u0431\u043b\u043e\u043d <strong>Single \u00a0View Application<\/strong>. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043b\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e <strong><span style=\"color: #0000ff;\">view<\/span><\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0438\u0441\u0443\u0435\u0442 \u0441\u0435\u0442\u043a\u0443 \u0441 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0441\u0442\u0440\u043e\u043a (<strong>rows<\/strong>) \u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 (<strong>columns<\/strong>). \u0414\u0435\u0442\u0430\u043b\u0438 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b, \u043d\u043e \u0432\u043e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 <strong><span style=\"color: #0000ff;\">class<\/span><\/strong>:<\/span><\/p>\n<pre class=\"line-numbers\"><code class=\"language-swift\">class GridView : UIView {\r\n  var rowCount: Int { get set }\r\n  var columnCount: Int { get set }\r\n  var lineColor: UIColor { get set }\r\n  var lineWidth: CGFloat { get set }\r\n}<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">\u042f \u043c\u043e\u0433\u0443 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e <strong><span style=\"color: #0000ff;\">view<\/span><\/strong>\u00a0<strong><span style=\"color: #0000ff;\">@IBDesignable<\/span><\/strong> \u0438\u00a0<strong><span style=\"color: #0000ff;\">@IBInspectable<\/span><\/strong>, \u0442\u0430\u043a \u0447\u0442\u043e \u044f \u043c\u043e\u0433\u0443 \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0438 \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u043e \u0432\u00a0<strong>Interface Builder<\/strong>. \u0410 \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u044f \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e <strong>Interface Builder<\/strong>? &#8220;\u0416\u0438\u0432\u043e\u0435 <strong>View<\/strong>&#8221; (<span style=\"font-weight: 400;\"><strong>Live View<\/strong>) \u043d\u0430 <strong>P<\/strong><\/span><strong>layground<\/strong> \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u043c\u043d\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0431\u0435\u043b. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c.<\/span><\/p>\n<h1 id=\"creating-a-workspace\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Workspace<\/h1>\n<p><span style=\"font-weight: 400;\">\u041d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0448\u0430\u0433\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c &#8220;\u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e&#8221;\u00a0<strong><a href=\"https:\/\/developer.apple.com\/library\/content\/featuredarticles\/XcodeConcepts\/Concept-Workspace.html\">Xcode workspace<\/a><\/strong>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u0430\u043a <strong>Xcode<\/strong> \u043f\u0440\u043e\u0435\u043a\u0442, \u0442\u0430\u043a \u0438 <strong>Playground<\/strong>. \u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0441 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e <strong>Xcode<\/strong> \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0443\u043d\u043a\u0442 \u201c<strong>Save As Workspace\u2026<\/strong>\u201d \u0438\u0437 \u043c\u0435\u043d\u044e <strong>File<\/strong>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u042f \u043d\u0430\u0437\u043e\u0432\u0443 \u043c\u043e\u0435 &#8220;\u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e&#8221; <strong>GridView<\/strong>\u00a0\u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044e \u0435\u0433\u043e \u043a\u0430\u043a <strong>x\u0441workspace<\/strong> \u0444\u0430\u0439\u043b \u0432 \u0442\u043e\u043c \u0436\u0435 \u0441\u0430\u043c\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u0447\u0442\u043e \u0438 <strong>xcodeproj<\/strong> \u0444\u0430\u0439\u043b:<\/span><\/p>\n<p><a href=\"https:\/\/www.bestkora.com\/SwiftLearning\/adding-playgrounds-to-xcode-projects\/screenshot-2018-12-24-at-18-12-55\/\" rel=\"attachment wp-att-876\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-876\" src=\"https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-24-at-18.12.55.png\" alt=\"\" width=\"1176\" height=\"504\" srcset=\"https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-24-at-18.12.55.png 1176w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-24-at-18.12.55-300x129.png 300w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-24-at-18.12.55-768x329.png 768w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-24-at-18.12.55-1024x439.png 1024w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-24-at-18.12.55-500x214.png 500w\" sizes=\"auto, (max-width: 1176px) 100vw, 1176px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c <strong>workspace <\/strong>\u0444\u0430\u0439\u043b, \u0430 \u043d\u0435 \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438\u043b\u0438 <strong>Playground<\/strong>.<\/span><\/p>\n<h1 id=\"adding-a-playground\">\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c Playground<\/h1>\n<p><span style=\"font-weight: 400;\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u0443\u044e <strong>Playground<\/strong>\u00a0\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u043d\u044e \u201c<strong>File<\/strong> -&gt; <strong>New<\/strong> -&gt; <strong>Playground<\/strong>\u2026\u201d, \u0434\u0430\u0435\u043c \u0435\u0439 \u0438\u043c\u044f \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0432 \u0442\u043e\u043c \u0436\u0435 \u0441\u0430\u043c\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u044b <strong>xcodeproj<\/strong> \u0438 <strong>xcworkspace<\/strong>. \u0423 \u0432\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0444\u0430\u0439\u043b\u044b: \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <strong>xcodeproj<\/strong>, &#8220;\u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430&#8221; <strong>workspace<\/strong> \u0438 <strong>Playground<\/strong> \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/span><\/p>\n<p><a href=\"https:\/\/www.bestkora.com\/SwiftLearning\/adding-playgrounds-to-xcode-projects\/screenshot-2018-12-24-at-18-27-26\/\" rel=\"attachment wp-att-877\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-877\" src=\"https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-24-at-18.27.26.png\" alt=\"\" width=\"1420\" height=\"396\" srcset=\"https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-24-at-18.27.26.png 1420w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-24-at-18.27.26-300x84.png 300w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-24-at-18.27.26-768x214.png 768w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-24-at-18.27.26-1024x286.png 1024w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-24-at-18.27.26-500x139.png 500w\" sizes=\"auto, (max-width: 1420px) 100vw, 1420px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0417\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u043c <strong>Playground<\/strong>\u00a0\u0438\u0437 <strong>Finder<\/strong> \u0432 <strong>Xcode<\/strong> \u043d\u0430 \u0441\u0430\u043c\u044b\u0439 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c. <strong>\u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 Playground \u043a workspace, \u0430 \u043d\u0435 \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443.<\/strong><\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0412 \u041d\u0430\u0432\u0438\u0433\u0430\u0442\u043e\u0440\u0435 \u0443 \u0432\u0430\u0441 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c <strong>Playground<\/strong> \u0438 \u043f\u0440\u043e\u0435\u043a\u0442:<\/span><\/p>\n<p><a href=\"https:\/\/www.bestkora.com\/SwiftLearning\/adding-playgrounds-to-xcode-projects\/screenshot-2018-12-24-at-18-50-50\/\" rel=\"attachment wp-att-878\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-878\" src=\"https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-24-at-18.50.50.png\" alt=\"\" width=\"1302\" height=\"322\" srcset=\"https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-24-at-18.50.50.png 1302w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-24-at-18.50.50-300x74.png 300w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-24-at-18.50.50-768x190.png 768w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-24-at-18.50.50-1024x253.png 1024w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-24-at-18.50.50-500x124.png 500w\" sizes=\"auto, (max-width: 1302px) 100vw, 1302px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u044e, \u043c\u044b \u0434\u0430\u0436\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u044b (<strong>resources<\/strong>) \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 <strong>Playground<\/strong>. \u0423 <strong>Playground<\/strong>\u00a0\u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c (<strong>module<\/strong>) \u0438 \u043e\u043d\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u0438\u0434\u0435\u0442\u044c <strong>target<\/strong> \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0427\u0442\u043e\u0431\u044b \u043e\u0431\u043e\u0439\u0442\u0438 \u044d\u0442\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0432 <strong>Playground<\/strong>.<\/span><\/p>\n<h1>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Framework.<\/h1>\n<p><span style=\"font-weight: 400;\">\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 (<strong>framework<\/strong>) \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u00a0<span style=\"color: #0000ff;\"><strong>view<\/strong><\/span> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u00a0\u043c\u0435\u043d\u044e \u201c<strong>File<\/strong> -&gt; <strong>New<\/strong> -&gt; <strong>Target<\/strong>\u2026\u201d \u0438 \u0432\u044b\u0431\u0435\u0440\u0430\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d \u201c<strong>Cocoa Touch Framework<\/strong>\u201d:<\/span><\/p>\n<p><a href=\"https:\/\/www.bestkora.com\/SwiftLearning\/adding-playgrounds-to-xcode-projects\/screenshot-2018-12-25-at-13-37-35-2\/\" rel=\"attachment wp-att-882\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-882\" src=\"https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-25-at-13.37.35-1.png\" alt=\"\" width=\"1476\" height=\"1068\" srcset=\"https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-25-at-13.37.35-1.png 1476w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-25-at-13.37.35-1-300x217.png 300w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-25-at-13.37.35-1-768x556.png 768w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-25-at-13.37.35-1-1024x741.png 1024w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-25-at-13.37.35-1-415x300.png 415w\" sizes=\"auto, (max-width: 1476px) 100vw, 1476px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u041d\u0430\u0437\u043e\u0432\u0451\u043c \u0432\u0430\u0448 <strong>framework<\/strong> (\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0438\u043c\u044f <strong><span style=\"color: #0000ff;\">GridViewUI<\/span><\/strong>) \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u043f\u043e\u043b\u0435 \u201c<strong>Embed In Application<\/strong>\u201d \u043d\u0430 \u201c<strong>None<\/strong>\u201d:<\/span><\/p>\n<p><a href=\"https:\/\/www.bestkora.com\/SwiftLearning\/adding-playgrounds-to-xcode-projects\/screenshot-2018-12-25-at-13-43-59\/\" rel=\"attachment wp-att-883\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-883\" src=\"https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-25-at-13.43.59.png\" alt=\"\" width=\"1130\" height=\"590\" srcset=\"https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-25-at-13.43.59.png 1130w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-25-at-13.43.59-300x157.png 300w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-25-at-13.43.59-768x401.png 768w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-25-at-13.43.59-1024x535.png 1024w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-25-at-13.43.59-500x261.png 500w\" sizes=\"auto, (max-width: 1130px) 100vw, 1130px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0430\u0439\u043b\u044b. \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u043e\u0442\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 <strong>Playground<\/strong>, \u0432 \u00a0 <strong>target<\/strong> \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 (<strong>framework<\/strong>). \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c <span style=\"color: #0000ff;\"><strong>GridView<\/strong> <strong>class<\/strong><\/span>. \u041a\u043b\u0438\u043a\u0430\u0435\u043c \u043d\u0430 \u0444\u0430\u0439\u043b\u0435 <strong>GridView.swift<\/strong> \u0432 \u043d\u0430\u0432\u0438\u0433\u0430\u0442\u043e\u0440\u0435 \u00a0\u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0418\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440 \u0424\u0430\u0439\u043b\u043e\u0432 (\u0432 \u043f\u0440\u0430\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u044d\u043a\u0440\u0430\u043d\u0430) \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c <span style=\"color: #0000ff;\"><strong>GridView<\/strong> <strong>class<\/strong><\/span>\u00a0\u0432 \u043d\u0430\u0448 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a (<strong>framework<\/strong>). \u0415\u0441\u043b\u0438 \u0431\u044b \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u0438 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u043c \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c, \u0442\u043e \u044f \u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0438\u0445 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435<\/span><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><a href=\"https:\/\/www.bestkora.com\/SwiftLearning\/adding-playgrounds-to-xcode-projects\/screenshot-2018-12-26-at-13-48-36\/\" rel=\"attachment wp-att-885\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-885\" src=\"https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-26-at-13.48.36.png\" alt=\"\" width=\"1774\" height=\"1020\" srcset=\"https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-26-at-13.48.36.png 1774w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-26-at-13.48.36-300x172.png 300w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-26-at-13.48.36-768x442.png 768w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-26-at-13.48.36-1024x589.png 1024w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-26-at-13.48.36-500x287.png 500w\" sizes=\"auto, (max-width: 1774px) 100vw, 1774px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0417\u0430\u043c\u0435\u0442\u044c\u0442\u0435, \u0447\u0442\u043e \u044f \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u043a\u043b\u0430\u0441\u0441 <strong><span style=\"color: #0000ff;\">class<\/span><\/strong> <strong><span style=\"color: #0000ff;\">GridView<\/span><\/strong> \u043a\u0430\u043a \u0447\u043b\u0435\u043d\u0430\u00a0<strong>target<\/strong> \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f <strong>GridView<\/strong>. \u00a0\u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a (<strong>framework<\/strong>) \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 <strong>Playground<\/strong>, \u0430 \u043d\u0435 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u043e\u043f\u0446\u0438\u044e \u201c<strong>Embed In Application<\/strong>\u201d (\u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435), \u0442\u043e \u0443\u0431\u0435\u0440\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0438\u0437 <strong>target<\/strong> \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u041c\u043d\u0435 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u043c\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043d\u0430 <strong>Playground<\/strong>, <strong><span style=\"color: #0000ff;\">public<\/span><\/strong>. \u0423\u0440\u043e\u0432\u0435\u043d\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 <strong><span style=\"color: #0000ff;\">internal<\/span><\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e (<strong>default<\/strong>), \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043b\u0438\u0448\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u0435\u043c. \u0421\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u043b\u044e\u0431\u043e\u0439 \u0422\u0418\u041f, \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 <strong><span style=\"color: #0000ff;\">public<\/span><\/strong>, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u043c\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043d\u0438\u043c \u043d\u0430 \u00a0<strong>Playground<\/strong>:<\/span><\/p>\n<p><a href=\"https:\/\/www.bestkora.com\/SwiftLearning\/adding-playgrounds-to-xcode-projects\/screenshot-2018-12-26-at-13-55-09\/\" rel=\"attachment wp-att-886\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-886\" src=\"https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-26-at-13.55.09.png\" alt=\"\" width=\"930\" height=\"436\" srcset=\"https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-26-at-13.55.09.png 930w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-26-at-13.55.09-300x141.png 300w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-26-at-13.55.09-768x360.png 768w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-26-at-13.55.09-500x234.png 500w\" sizes=\"auto, (max-width: 930px) 100vw, 930px\" \/><\/a><\/p>\n<h1 id=\"build-the-framework\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 (framework).<\/h1>\n<p><span style=\"font-weight: 400;\"><strong>\u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0435, \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0435 \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0435 \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u043b\u0435\u043d\u0430\u043c\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0437\u0430\u043d\u043e\u0432\u043e (rebuild) \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a.<\/strong>\u00a0\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c <strong>target<\/strong> \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430, \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 <strong>iOS<\/strong> \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0430\u0432\u0438\u0448 <strong>\u2318B<\/strong>:<\/span><\/p>\n<p><a href=\"https:\/\/www.bestkora.com\/SwiftLearning\/adding-playgrounds-to-xcode-projects\/screenshot-2018-12-26-at-14-30-58\/\" rel=\"attachment wp-att-888\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-888\" src=\"https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-26-at-14.30.58.png\" alt=\"\" width=\"712\" height=\"126\" srcset=\"https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-26-at-14.30.58.png 712w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-26-at-14.30.58-300x53.png 300w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-26-at-14.30.58-500x88.png 500w\" sizes=\"auto, (max-width: 712px) 100vw, 712px\" \/><\/a><\/p>\n<h1 id=\"import-and-use\">Import \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u043d\u0430 Playground<\/h1>\n<p><span style=\"font-weight: 400;\">\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u043a\u043b\u0430\u0441\u0441 <strong><span style=\"color: #0000ff;\">class GridView<\/span> <\/strong>\u043d\u0430 <strong>Playground<\/strong>:<\/span><\/p>\n<pre class=\"line-numbers\"><code class=\"language-swift\">import UIKit\r\nimport GridViewUI\r\nimport PlaygroundSupport\r\n\r\nlet grid = GridView()\r\ngrid.backgroundColor = .lightGray\r\ngrid.rowCount = 3\r\ngrid.columnCount = 3\r\ngrid.lineColor = .blue\r\ngrid.lineWidth = 5\r\n\r\ngrid.frame = CGRect(x: 0, y: 0, width: 200, height: 300)\r\nPlaygroundPage.current.liveView = grid<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 \u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 (<strong>Assistant Editor<\/strong>) \u0434\u043b\u044f \u043f\u043e\u043a\u0430\u0437\u0430 &#8220;\u0436\u0438\u0432\u043e\u0433\u043e <strong>View<\/strong>&#8221; (<strong>Live View<\/strong>):<\/span><\/p>\n<p><a href=\"https:\/\/www.bestkora.com\/SwiftLearning\/adding-playgrounds-to-xcode-projects\/screenshot-2018-12-26-at-14-35-37\/\" rel=\"attachment wp-att-889\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-889\" src=\"https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-26-at-14.35.37.png\" alt=\"\" width=\"1828\" height=\"730\" srcset=\"https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-26-at-14.35.37.png 1828w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-26-at-14.35.37-300x120.png 300w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-26-at-14.35.37-768x307.png 768w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-26-at-14.35.37-1024x409.png 1024w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-26-at-14.35.37-500x200.png 500w\" sizes=\"auto, (max-width: 1828px) 100vw, 1828px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0418 \u044d\u0442\u043e \u0432\u0441\u0435.<\/span><\/p>\n<h1 id=\"create-a-playground-tab\">\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u043a\u043b\u0430\u0434\u043a\u0443 Playground.<\/h1>\n<p><span style=\"font-weight: 400;\">\u041c\u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u00a0<a href=\"https:\/\/useyourloaf.com\/blog\/making-xcode-behave\/\"><strong>Xcode Behaviors<\/strong><\/a>\u00a0\u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432\u043a\u043b\u0430\u0434\u043a\u0438 \u0434\u043b\u044f \u043f\u043e\u043a\u0430\u0437\u0430 <strong>Playground<\/strong> c <span style=\"font-weight: 400;\">\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043e\u043c \u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 (<strong>Assistant Editor<\/strong>)<\/span>. \u0423 \u043c\u0435\u043d\u044f \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0432\u0438\u0448 <strong>\u2303\u2325\u2318P<\/strong> \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e\u043c\u0443 &#8220;\u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e&#8221;:<\/span><\/p>\n<p><a href=\"https:\/\/www.bestkora.com\/SwiftLearning\/adding-playgrounds-to-xcode-projects\/screenshot-2018-12-27-at-17-47-04\/\" rel=\"attachment wp-att-891\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-891\" src=\"https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-27-at-17.47.04.png\" alt=\"\" width=\"1064\" height=\"476\" srcset=\"https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-27-at-17.47.04.png 1064w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-27-at-17.47.04-300x134.png 300w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-27-at-17.47.04-768x344.png 768w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-27-at-17.47.04-1024x458.png 1024w, https:\/\/www.bestkora.com\/SwiftLearning\/wp-content\/uploads\/2018\/12\/Screenshot-2018-12-27-at-17.47.04-500x224.png 500w\" sizes=\"auto, (max-width: 1064px) 100vw, 1064px\" \/><\/a><\/p>\n<h1>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u041a\u043e\u0434\u0430.<\/h1>\n<p><span style=\"font-weight: 400;\">\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043f\u043e\u043b\u043d\u044b\u0439 <strong>Xcode<\/strong> \u043f\u0440\u043e\u0435\u043a\u0442 <strong>GridView<\/strong> \u043d\u0430 \u043c\u043e\u0435\u043c <strong>GitHub<\/strong> \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 <strong>CodeExamples<\/strong>, \u0438 \u0432\u043e\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 :<\/span><\/p>\n<ul>\n<li><strong><a href=\"https:\/\/github.com\/kharrison\/CodeExamples\/tree\/master\/GridView\">GridView<\/a><\/strong><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435. \u042d\u0442\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438<strong>\u00a0<a href=\"https:\/\/useyourloaf.com\/blog\/adding-playgrounds-to-xcode-projects\/\">Adding Playgrounds to Xcode Projects.<\/a><\/strong><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Playgrounds &#8211; \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438\u0434\u0435\u0438, \u043d\u043e \u044f, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0438\u0445 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e. \u0418\u0437 \u043d\u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u044c\u043e\u043d\u043e\u0432, \u0435\u0441\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0432\u0430\u0448\u0438 Xcode \u043f\u0440\u043e\u0435\u043a\u0442\u044b. \u042f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043b\u044e\u0431\u043b\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 Playground\u00a0&#8220;\u0436\u0438\u0432\u044b\u0435 \u00a0View&#8221; (Live View) \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 view \u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0439 &hellip; <a href=\"https:\/\/www.bestkora.com\/SwiftLearning\/adding-playgrounds-to-xcode-projects\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[16],"tags":[],"class_list":["post-867","post","type-post","status-publish","format-standard","hentry","category-playground"],"aioseo_notices":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.bestkora.com\/SwiftLearning\/wp-json\/wp\/v2\/posts\/867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bestkora.com\/SwiftLearning\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bestkora.com\/SwiftLearning\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bestkora.com\/SwiftLearning\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bestkora.com\/SwiftLearning\/wp-json\/wp\/v2\/comments?post=867"}],"version-history":[{"count":16,"href":"https:\/\/www.bestkora.com\/SwiftLearning\/wp-json\/wp\/v2\/posts\/867\/revisions"}],"predecessor-version":[{"id":894,"href":"https:\/\/www.bestkora.com\/SwiftLearning\/wp-json\/wp\/v2\/posts\/867\/revisions\/894"}],"wp:attachment":[{"href":"https:\/\/www.bestkora.com\/SwiftLearning\/wp-json\/wp\/v2\/media?parent=867"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bestkora.com\/SwiftLearning\/wp-json\/wp\/v2\/categories?post=867"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bestkora.com\/SwiftLearning\/wp-json\/wp\/v2\/tags?post=867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<!-- WP Super Cache is installed but broken. The constant WPCACHEHOME must be set in the file wp-config.php and point at the WP Super Cache plugin directory. -->