我,是造成我想不通这是该类别的.H错误一个UIView类别:UIView的范畴导致无法识别选择错误
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, BCRectEdge) {
BCRectEdgeTop = 0,
BCRectEdgeLeft = 1,
BCRectEdgeBottom = 2,
BCRectEdgeRight = 3
};
@interface UIView (Genie)
/*
* After the animation has completed the view's transform will be changed to match the destination's rect, i.e.
* view's transform (and thus the frame) will change, however the bounds and center will *not* change.
*/
- (void)genieInTransitionWithDuration:(NSTimeInterval)duration
destinationRect:(CGRect)destRect
destinationEdge:(BCRectEdge)destEdge
completion:(void (^)())completion;
/*
* After the animation has completed the view's transform will be changed to CGAffineTransformIdentity.
*/
- (void)genieOutTransitionWithDuration:(NSTimeInterval)duration
startRect:(CGRect)startRect
startEdge:(BCRectEdge)startEdge
completion:(void (^)())completion;
@end
然后它我将其导入到一个视图控制器。创建一个新的UIView并使用其中一种方法。它建议这种方法,因为我开始打字,如果我定义它,它会去正确的地方。但是,当我运行它,它说:
'-[UIView genieInTransitionWithDuration:destinationRect:destinationEdge:completion:]: unrecognized selector sent to instance 0x1552c220'
有什么想法?快把我逼疯。
您是否将UIView + Genie.h文件导入到viewcontroller中? – 2013-05-10 20:13:38
雅我想通了,当我将文件添加到我的项目它没有添加到目标 – JeffN 2013-05-10 20:14:56