Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Objective-c Compatibility #4

Closed
remirobert opened this issue Jan 30, 2015 · 3 comments
Closed

Objective-c Compatibility #4

remirobert opened this issue Jan 30, 2015 · 3 comments

Comments

@remirobert
Copy link

Is it compatible Objective-c ? The override change stat doesn't call with Objective-c code.
Thanks in advance.

@JigarM
Copy link

JigarM commented Jan 30, 2015

@remirobert
you can import the swift file in the Objective C project using bridging header.
Check this :
http://stackoverflow.com/questions/24002369/how-to-call-objective-c-code-from-swift

@JigarM
Copy link

JigarM commented Jan 30, 2015

@remirobert : just use paper switch in Obj C Code :
https://github.com/JigarM/paper-switch-ObjectiveC

@remirobert
Copy link
Author

It doesn't work for me programtly, from a UItableViewCell or a simple UIView.

self.switchResponse = [[RAMPaperSwitch alloc] init];
self.switchResponse.frame = CGRectMake(self.mainView.frame.size.width - self.switchResponse.frame.size.width - 10, 0,
self.switchResponse.frame.size.width, self.switchResponse.frame.size.height);
[self.mainView addSubview:self.switchResponse];
[self.switchResponse setOnTintColor:[UIColor blueColor]];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants