Duck
Duck

Reputation: 35953

Expected Identifier? What?

I have this property declared on a singleton:

@property (nonatomic, copy) void (^onUpdate)();

After starting the singleton on a class I have these lines:

[self.singleton.onUpdate = ^{ 
  CGAffineTransform rot = CGAffineTransformMakeRotation(degreesToRadian(angle));
  [UIView animateWithDuration:0.1 animations:^{
      myself.object.transform = rot;
  }];
}];

I have an "expected identifier" error on this last line... what?

any ideas?

Upvotes: 0

Views: 193

Answers (1)

user529758
user529758

Reputation:

You have an extraneous pair of brackets surrounding your assignment statement. Remove.

Upvotes: 2

Related Questions