0

There is a piece of code like

typedef void (^SignIn) (NSString *email, NSString *password);

What does the ^ mean before SignIn? Is this Objective-C specific usage?

rmaddy
  • 307,833
  • 40
  • 508
  • 550
Adam Lee
  • 23,314
  • 47
  • 144
  • 221

2 Answers2

4

It's the syntax for blocks.

That typedef declares SignIn to mean a block which takes two NSString* arguments and returns void (i.e. nothing).

Jeremy Roman
  • 15,862
  • 1
  • 40
  • 44
1

It is a block.

For a guide to understanding blocks, see this tutorial

Unless, you already know what a block is, and you just didn't know what the caret was for.

CaptJak
  • 3,562
  • 1
  • 27
  • 50