jberlana/JBKenBurns

duplicate symbol _JBZoomMode in:

Closed this issue · 6 comments

I manually add the classes to the project and import the header into my view controller and i get this error from Xcode.

duplicate symbol _JBZoomMode in:

ld: 2 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I'm seeing the same thing.

ya i fixed it by recreating the enum JBZoomMode on .m and everything works fine..

@suu10mac What do yo mean by recreating the enum in .m? I am still facing the same error.

Same here!

@bharath-kamath found it!
You have to take these from the .h:

@property (nonatomic,assign) enum JBZoomMode zoomMode;

and

NS_ENUM(NSInteger, JBZoomMode) {
    JBZoomModeIn,
    JBZoomModeOut,
    JBZoomModeRandom
};

Then paste them in the .m:

#import "JBKenBurnsView.h"

#define enlargeRatio 1.1
#define imageBufer 3

enum JBSourceMode {
    JBSourceModeImages,
    JBSourceModePaths
};


NS_ENUM(NSInteger, JBZoomMode) {
    JBZoomModeIn,
    JBZoomModeOut,
    JBZoomModeRandom
};

// Private interface
@interface JBKenBurnsView ()

@property (nonatomic, strong) NSMutableArray *imagesArray;
@property (nonatomic, strong) NSTimer *nextImageTimer;

@property (nonatomic, assign) CGFloat showImageDuration;
@property (nonatomic, assign) BOOL shouldLoop;
@property (nonatomic, assign) BOOL isLandscape;
@property (nonatomic, assign) enum JBSourceMode sourceMode;
@property (nonatomic,assign) enum JBZoomMode zoomMode;


@end
...HERE GOES THE REST OF THE FILE...

Hope it helps!

@facundomedica Yep, that did help. Thank you!