I'm trying to add a color picker in my add and I use this https://github.com/gizmosachin/ColorSlider library which is only written in swift and I use objective-c. I have followed this guide How to call Objective-C code from Swift on how to add swift libraries in objective-c projects. I'm 99% sure that I have properly configured xcode because I can import the swift library and run my app without an error, it's only when I try to instantiate the swift class that the app crashes and I see that the init method for the swift class is called infinitely. The source code for the library is one file and listed for reference just in case (https://github.com/gizmosachin/ColorSlider/blob/master/Source/ColorSlider.swift)
Here is one of the init methods (the other inits are overrides)
// MARK: Initializers
convenience init() {
println("hi there swift")
self.init()
backgroundColor = UIColor.clearColor()
}
in my log I see "hi there swift" print out many times. This is how I initiate the swift class
ColorSlider *colorSlider = [[ColorSlider alloc] init];
I know that the function containing the line of code above is only being called once because I used NSLog(@"output") to see how many times this shows up and the output looks like this
output
hi there swift
hi there swift
hi there swift
hi there swift
hi there swift
etc...to infinity or until app crashes
Am I instantiating the swift class correctly? I'm not sure why the swift class's init method is called infinitely
----UPDATE-----