subinspathilettu / SJSegmentedViewController

MIT License
334 stars 126 forks source link

Very Simple Compiling error when adding manually #55

Closed yodine closed 7 years ago

yodine commented 7 years ago

When adding your control manually, your component won't compile In SJSegmentTab.swift, you use : import Foundation

Where it should be, like other files, as you use uikit controls : import UIKit

Just changing that resolves the issue

feliciaf commented 7 years ago

i tried adding manually however it is not working. which files do you add? I added the classes and pods file. please need guidance.

feliciaf commented 7 years ago

i am using swift 2.3

yodine commented 7 years ago

I am using latest swift 3.? When you add the control manually you only copy the swift files for the control: no pod file, no Xcode project file either. I am not behind my computer but I remember a folder containing only the.swift files for the control. It may contained plist files but I didn't take those. Everything compiles fine except the import error, easy fix. After it works wonderfully. Is this enough for you? If not I'll have to wait until I have the computer

feliciaf commented 7 years ago

ok let me try again.

feliciaf commented 7 years ago

ok, got that part corrected. however, when i add import to one of the view controllers, it does not recognize the module... ? pls when you have the computer, to check on your side. it will be greatly appreciated :)

yodine commented 7 years ago

Now I have the computer, I suppose you only took the content of SJSegmentedScrollView/Classes files. Then, after you correct the import problem in one file, you can use the control directly. As you copied the files manually to your project, it is not a separate module as when you use pod. You don't have to import anything to use the control : it is part of your project now, not a separate framework you have to import. Is it working for you now ? Pod is great but for me it puts a real mess in the original project just to use an external framework.

feliciaf commented 7 years ago

ok, awesome! it works! thanks for your time and feedback :)