0

I am trying to run a method that takes a CGRect parameter after 2 seconds with the following line of code:

[self performSelector:@selector(drawLineChart:) withObject:rect afterDelay:2.0];

but I get the error:

Sending 'CGRect' (aka 'struct CGRect') to parameter of incompatible type 'id _Nullable'

How can I work around this?

jscs
  • 63,694
  • 13
  • 151
  • 195
helloB
  • 3,472
  • 10
  • 40
  • 87
  • 1
    Also see http://stackoverflow.com/questions/2302415/trying-to-pass-cgrect-to-performselector-withobject?s=1|1.9200 – rmaddy Sep 30 '15 at 21:48
  • 2
    Better yet, use `dispatch_after` instead of `performSelector:withObject:afterDelay:`. – rmaddy Sep 30 '15 at 21:49

0 Answers0