Reputation: 45
Hi this is my first question and I'm wording about the problem I'm facing hope any one can help
i have a public method in class i included called +(void)show which should change the alpha of a property
thats whats im doing
+(void)show
{
[UIView animateWithDuration:0.5
delay:0.1
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.O.alpha=1;
}
completion:^(BOOL finished) {
//
}];
//... code
}
but it gives me an error any one knows why or how to solve it ? thanks in advance
Upvotes: 1
Views: 454
Reputation: 5745
That is because this is a class method, and you can't access properties in a class method. Make it an instance method by changing the +
to a -
.
Upvotes: 5