Santosh Santosh - 5 months ago 9
iOS Question

How to call below objective c category from swift class

#import <UIKit/UIKit.h>

@interface UIView (AEScaningEffect)


- (void) startScaningRepeatCount:(int)count;
- (void) startScaningRepeatCount:(int)count Duration:(int)duration;
- (void) startScaningRepeatCount:(int)count Duration:(int)duration HeightFactor:(float) factor;

- (void) stopScaning;

@end

Rob Rob
Answer

You call it as simply as:

imgView.startScaningRepeatCount(2)

Or

imgView.startScaningRepeatCount(1000, duration: 2)

Or

imgView.startScaningRepeatCount(1000, duration: 2, heightFactor: 0.3)

Etc.

Remember to import your category's header from the project's bridging header.