{"id":1766,"date":"2020-09-23T16:02:49","date_gmt":"2020-09-23T16:02:49","guid":{"rendered":"https:\/\/sezeromer.com\/?p=1766"},"modified":"2023-02-27T22:43:43","modified_gmt":"2023-02-27T19:43:43","slug":"xcode-code-snippet","status":"publish","type":"post","link":"https:\/\/sezeromer.com\/en\/xcode-code-snippet\/","title":{"rendered":"XCode Code Snippet"},"content":{"rendered":"<p>Hello friends. In this article, I will talk about how to create a code snippet with XCode. What is a Code Snippet should be mentioned first. It allows Xcode to automatically fill itself when you actually press the Tab key while you are writing code. For example, when you type a for loop and press the Tab key, it automatically prepares everything for you. You just fill the rest. Below are Swift&#8217;s Snippets. You can add something new yourself. I will talk about this.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1767\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-17.20.21-1024x519.png\" sizes=\"(max-width: 640px) 100vw, 640px\" srcset=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-17.20.21-1024x519.png 1024w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-17.20.21-300x152.png 300w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-17.20.21-768x389.png 768w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-17.20.21-1536x778.png 1536w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-17.20.21-2048x1037.png 2048w\" alt=\"\" width=\"640\" height=\"324\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Let&#8217;s say I want to add a comment line to a class and mark it. For this, let&#8217;s write a snippet where I can write \/\/ Mark. To do this, select the line where you will start the var snippet and click right. Create Code Snippet option will appear here. With it, we can create a new snippet.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1769\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-19.46.02-1024x662.png\" sizes=\"(max-width: 640px) 100vw, 640px\" srcset=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-19.46.02-1024x662.png 1024w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-19.46.02-300x194.png 300w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-19.46.02-768x496.png 768w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-19.46.02-1536x993.png 1536w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-19.46.02-2048x1324.png 2048w\" alt=\"\" width=\"640\" height=\"414\" \/><\/p>\n<p>Then you will see such a screen. On this screen, you need to specify what kind of structure you should create. For example, after I say \u201c\/\/ MARK -\u201d here, it will automatically open a section and write it there. This is just a simple example. You can increase your code writing speed by applying this process to the codes you use a lot. For Section Heading to appear, you need to write as follows.<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;swift&quot;,&quot;mime&quot;:&quot;text\/x-swift&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:true,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">\/\/ MARK - &lt;#Section Heading#&gt;<\/pre>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1770\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-19.47.51-1024x661.png\" sizes=\"(max-width: 640px) 100vw, 640px\" srcset=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-19.47.51-1024x661.png 1024w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-19.47.51-300x194.png 300w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-19.47.51-768x496.png 768w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-19.47.51-1536x991.png 1536w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-19.47.51-2048x1322.png 2048w\" alt=\"\" width=\"640\" height=\"413\" \/><\/p>\n<p>When we want to use it, it appears as follows.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1771\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-19.52.22-1024x396.png\" sizes=\"(max-width: 640px) 100vw, 640px\" srcset=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-19.52.22-1024x396.png 1024w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-19.52.22-300x116.png 300w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-19.52.22-768x297.png 768w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-19.52.22.png 1076w\" alt=\"\" width=\"640\" height=\"248\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1772\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-19.52.29.png\" sizes=\"(max-width: 810px) 100vw, 810px\" srcset=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-19.52.29.png 810w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-19.52.29-300x34.png 300w, https:\/\/sezeromer.com\/wp-content\/uploads\/2020\/06\/Screen-Shot-2020-06-13-at-19.52.29-768x87.png 768w\" alt=\"\" width=\"810\" height=\"92\" \/><\/p>\n<p>If you have questions, you can reach by e-mail or comment. Good work.<\/p>","protected":false},"excerpt":{"rendered":"<p>Hello friends. In this article, I will talk about how to create a code snippet with XCode. What is a Code Snippet should be mentioned first. It allows Xcode to automatically fill itself when you actually press the Tab key while you are writing code. For example, when you type a for loop and press [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1771,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[327],"tags":[204,704,705,703,328,282],"class_list":["post-1766","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-swift","tag-code","tag-code-snippet","tag-mark","tag-snippet","tag-swift","tag-xcode"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts\/1766"}],"collection":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/comments?post=1766"}],"version-history":[{"count":5,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts\/1766\/revisions"}],"predecessor-version":[{"id":2650,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts\/1766\/revisions\/2650"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/media\/1771"}],"wp:attachment":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/media?parent=1766"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/categories?post=1766"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/tags?post=1766"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}