Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do the Xcode icons signify during autocompletion? [duplicate]

Tags:

xcode

swift

See the S, Pr, T, L on the left side of the images - what do these initials signify? Kindly include answers for icons I have not mentioned here as well.

Image 1

enter image description here

Image 2

enter image description here

I only know that C represents class and S represents Struct.

like image 330
mfaani Avatar asked Jul 10 '16 17:07

mfaani


2 Answers

Protocol
Struct
Class
function
Value / Variable
Type
Local value / variable

like image 140
luk2302 Avatar answered Nov 04 '22 17:11

luk2302


As you've already surmised:

  • C: class
  • S: struct

Some others:

  • Pr: Protocol
  • Ex: extension (found in the symbol navigator, but not code completion)
  • T: Type (generic type constraint, protocol associated type, etc)
  • L: let constant / immutable property
  • V: var variable / mutable property
  • P: property (IIRC Xcode favors L/V for Swift, but you see P for ObjC properties)

(Not 100% sure of the last three, and I'm on the phone so I can't check. Will follow up later to verify those and add some more...)

like image 26
rickster Avatar answered Nov 04 '22 17:11

rickster