Reputation: 1011
I am trying to use a private animation (since I am not submitting it to App Store)
[UIView setAnimationTransition:103 forView:detailVC.view cache:YES];
[UIView setAnimationPosition: CGPointMake(262, 723)];
I get two warnings from setAnimationPosition
.
"UIView may not respond to setAnimationPosition"
"Semantic Issue, method setAnimationPosition not found".
Is there anyway to suppress these two warnings?
Thanks
Leo
Upvotes: 0
Views: 818
Reputation: 9836
You can simply add -w Complier Flag under Build Phases > Compile Sources against yourfilename.m
Note : this is working for non-arc class.
Upvotes: 0
Reputation: 3638
Simply declare them in a category declaration, like follows:
@interface UIView (PrivateMethods)
+ (void)setAnimationPosition:(CGPoint)point;
@end
However, as noted by Martin Gordon, Apple will reject your app if it uses private APIs.
Upvotes: 4
Reputation: 36389
A good development practice is to treat warnings as errors (unless you have a really good reason not to).
In your case, use of private APIs should be considered an error because Apple will reject your app if it uses undocumented APIs.
Upvotes: 2