SWRevealViewController
SWRevealViewController copied to clipboard
Swift Version
is it possible to have a swift version?
What for? You can use this ObjC library in a Swift project...
Yes but this library don't work in Xcode 9. I've open and issue about this.
after that, every code is coded in swift by compiler. than, why to have again a library written in OBJ-C? therefore this library is not updated from 2 years
I know but I am not the developer of this library. Why not working on Xcode 9? I have Xcode 8.3.3. What is the issue?
If I'm working on Xcode 9 is because I've reasons. if you aren't the developer of this library, please, don't intrude into the conversation. my issues are for developers of this library. I this is a great library and Whether this library is maintained and converted into swift can have a great potential for improvement
I know perfectly this library and I helped a lot of developer. It is why I answer. It is allowed, right? I asked you what are the issues on Xcode 9, I not asked you why do you use Xcode 9...
I also know the developer and I don't think there will be a swift version. You are welcome to fork it!
I'm sorry. I did not understand correctly.
I've open an issue about this problem, anyway they are these: 1)Console say me this:Unknown class SWRevealViewController in Interface Builder file.
2)if I connect button to swrevealviewcontroller action, the app crash with this error:Undefined symbols for architecture arm64: "OBJC_CLASS$_SWRevealViewController" referred from:
Ok, I don't think it is relative to Xcode 9, but I will install it to test.
also know the developer and I don't think there will be a swift version
This is so sad.
You are welcome to fork it! I hope to use it again in objective-c because I'm not a genius of swift and unfortunately I've no time to try to make it in swift, but if I have no choice..........
I don't think it is relative to Xcode 9 in Xcode 8.x.x i've no problem
anyway, thank you for your interest about this
Downloading Xcode 9, but my connection is very slow. Do you drag the .h and .m in your project or do you use Cocoapods? (Cocoapods version is not up to date). The latest version is 2.4 and you can see it in the .h
I drag the .h and .m file. I don’t use cocoapod because I don’t like it
Tested and works!
In your storyboard check it is like this screenshot:

And Product->Clean And Alt+Product->Clean Build Forder...
I'm sorry but the problem still
this is the error: Undefined symbols for architecture x86_64: "OBJC_CLASS$_SWRevealViewController", referenced from: objc-class-ref in MyClassViewController.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Ok this is the 2) point. How did you connect your button? Can you elaborate? What is your code for that?
I connect the button by Storyboard @IBOutlet weak var menuButton: UIBarButtonItem!
this is the code that when there is, don't build. but when I comment this if everything work
if self.revealViewController() != nil {
menuButton.target = self.revealViewController()
menuButton.action = #selector(SWRevealViewController.revealToggle(_:))
self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
}
Only link error? No compil errors?
That's right.
Now I've tried to open the project with Xcode 8. same problem. Now I'm trying to do the opposite. create it in Xcode 8 and open it with Xcode 9
If I create a the project with Xcode 8 and I open it with Xcode 9 work. I have also 45 warning but work. or build without error
Did you try to delete the derived data folder?
No. How I do it?
Go to Xcode->Preferences
Tab: Locations
Click on the arrow and in the finder delete all the folder for this application:

I've found the problem.

when you add the .h and .m file Though the target flag is checked, the flag don't be checked. when I've checked, The problem has disappeared.
however, a swift version I think be better!
anyway, thank you very much for your help
nothing. the first problem still again
Unknown class _TtC38MyProjectName22SWRevealViewController in Interface Builder file.
Found it!

without check work perfectly
Yes when you drag a .m .h into a project there is a dialog box where you can check the targets. Well done! For the Swift version, I do not think there will be one except a fork. However, I have a similar library (see my profile) and I have a Swift version (not yet on line) but soon. I can send you the files if you want.
If you are interested, open an issue to https://github.com/iDevelopper/PBRevealViewController
Same issue. Any Solution?
Solved. viewcontroller.m file target membership was not checked