2

Using an @ sign in the comments allows you to notify another user to direct your comment at that person. For example, someone might comment @WolfLink. However, this makes it difficult to discuss certain iOS topics:

  • @2x and @3x images
  • @"NSString Literals" (and other literals like @5 or @[@1,@2] and so on)

How can I use an @ sign in the comments without it registering as targeting a user?

1
  • 1
    Does formatting as @"code" not work? It seems to have worked @2 times for me here.
    – nobody
    Commented Aug 27, 2015 at 2:08

1 Answer 1

6

Where appropriate, you can format the at-sign-containing phrase as code using backticks:

You can't add a literal string like `@"This is my string"` to a literal `NSNumber` like `@2`.

For non-code items, it's often appropriate to mark them off with quotes:

You've got to append the "@3x" to the filename itself.

In other cases, any non-whitespace character placed immediately before the "@" will stop it from being parsed as a ping, so a workaround is to pretend-escape it:

My Twitter handle is \@WolfLink, @user5551212.

although this will render with the backslash included.

3
  • 1
    You can't add a literal string like @"This is my string" to a literal NSNumber like @2.
    – jscs
    Commented Aug 27, 2015 at 2:32
  • You've got to append the "@3x" to the filename itself.
    – jscs
    Commented Aug 27, 2015 at 2:32
  • My Twitter handle is \@WolfLink, @user5551212.
    – jscs
    Commented Aug 27, 2015 at 2:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .