Skip to main content

All Questions

Tagged with
-1 votes
1 answer
493 views

Xcode default snippets (if, for, struct etc.) not showing in autocomplete

I am new to Swift and also Xcode. In many tutorials I can see that snippets are really usefull especially for the beginners like me. Unfortunately I cant use them. When I am typing something, for ...
ufuk's user avatar
  • 3
1 vote
1 answer
293 views

Add code snippet with multiple availability scopes? Xcode 13

How do you update Xcode 13 code snippets so they are available in more than one scope? For example, update a code snippet to Availability: Class Implementation or Top level. It seems this should be ...
Eric's user avatar
  • 799
2 votes
2 answers
647 views

Get func placeholder values from a snippet to appear after hitting tab at top level code level

New to swift and xcode, version 11.3.1. If I hit func<tab> in a class, the placeholder values pop in nicely and I can tab through them to complete them. However, when I have a simple ...
StevieD's user avatar
  • 7,463
1 vote
1 answer
345 views

Create Code Snippets for All Projects in Xcode?

Is it possible to have code snippets that I can create one time and I can use for all new projects instead of creating the same ones all the time again ? Thanks in Advance
SwiftiSwift's user avatar
  • 8,827
27 votes
3 answers
5k views

Adding code snippet in Code Snippet Library (Xcode 10)

Recently when I was using Xcode 10 beta 3, I tried to make a code snippet and add it to the code snippet library. But the drag drop cannot be done as the code snippet library is detached in Xcode 10, ...
Subhajit Halder's user avatar
5 votes
1 answer
611 views

Xcode 9 code snippets bug

I have a list of code snippets that works perfectly in Xcode 8.3.3, but in Xcode 9 I don't see them when I start typing. I tried to change Completion Scopes and I've got a new bug: when I press tab my ...
Ivan Smetanin's user avatar
16 votes
4 answers
10k views

Is there any shortcut for // MARK: in Xcode like there is for /// <#Description#>?

Is there any keyboard shortcut for '// MARK:' in swift like there is for header doc '/// Description' ?
Mr. SS's user avatar
  • 387
1 vote
0 answers
34 views

How do I build an Xcode shortcut for frequently used code snippet? [duplicate]

I have a Debug statement that I use quite often that I would like to build a Xcode shortcut for so I don't have to type it in all the time, how is it possible to make a shortcut that inserts a code ...
Matt Douhan's user avatar
  • 2,113
1 vote
2 answers
267 views

Swift Guard-Let Statement snippet

Why autocomplete for guardlet snippet doesn't work in closures? For example: DispatchQueue.main.async(execute: { guardlet //no any suggestions by Xcode }) Shouldn't I use this control statement ...
Artem Novichkov's user avatar
3 votes
2 answers
636 views

Xcode snippets are not being used in autocomplete

I have bolded important information to make this easier to read. I just updated to Xcode 7.3 yesterday and have tried all day to fix my issue. For class we are programming in C and use SVN to modify ...
4ward th1nk3r's user avatar
0 votes
0 answers
138 views

Inserting Swift Code Snippets from Terminal to xcode

I'm trying to automate some aspects of the iOS app development process. In this regard, I want to try and insert code into the Xcode project. I have created snippets but am not sure how I could ...
zaam's user avatar
  • 307
1 vote
0 answers
555 views

Xcode code comments code-snippet shortcut not working

In Xcode 7b6 or 7 in general, my code snippet completion shortcut is not working for my documentation comment snippets. Worked previously. I tried deleting the snippet and recreating it. I tried ...
soulshined's user avatar
  • 10.7k
1 vote
2 answers
449 views

xcode how to import multiple code snippets into IDE

I have multiple code snippets i found here and i want to import all of them at once into xcode but it does not work. When i try to import even just one code snippet from drag and drop from chrome to ...
j2emanue's user avatar
  • 62.6k
1 vote
0 answers
77 views

XCode Code Snippets, entering each token only once

I am using XCode 6.1, and I have the following code snippet: var <#InstanceFieldName#> : <#INSTANCE_FIELD_TYPE#> = <#INSTANCE_FIELD_INIT#>; func get<#...
Sean's user avatar
  • 1,108
0 votes
1 answer
93 views

How to implement this - generate setter automatically?

In Standford CS 193P 2013-2014 Fall lecture 7, the instructor shows the following thing. But I can't reproduce that mysef in Xcode 6. Anybody knows that? (.gif can also be seen here)
WangYudong's user avatar
  • 4,423

15 30 50 per page