Reputation: 6614
I'm getting a "Incompatible pointer to integer conversion" in an animation block and am unsure how to get rid of it.
here's the code where it appears and a screenshot below:
[UIView animateWithDuration:0.3f
delay:0.0f
options:nil
animations:^{
[menuView setFrame:CGRectMake(0.0f, 64.0f, 320.0f, 54.0f)];
menuView.alpha = 1.0;
}
completion:nil];
thanks for any help
Upvotes: 1
Views: 314
Reputation: 6932
You should read the docs. Normally they will tell you what something will accept.
It looks like in this case you have to use a Constant.
For example:
[UIView animateWithDuration:0.3f
delay:0.0f
options:UIViewAnimationOptionTransitionNone
animations:^{
[menuView setFrame:CGRectMake(0.0f, 64.0f, 320.0f, 54.0f)];
menuView.alpha = 1.0;
}
completion:NULL;
Upvotes: 3
Reputation: 43472
The options
parameter is not an object or pointer type, so of course you'll get this. It's an enumeration type, which is an alias of an appropriate integral type (i.e. int
.) To pass no options, pass 0
or kNilOptions
.
Upvotes: 5