tmdvs / TDBadgedCell

TDBadgedCell is a table view cell class that adds a badge, similar to the badges in Apple's own apps
www.tmdvs.me
MIT License
1.43k stars 182 forks source link

use of undeclared type "TDBadgedCell" #74

Closed rixingw closed 7 years ago

rixingw commented 7 years ago

Using TDBadgedCell (4.1.1)

swift 3 I did use import TDBadgedCell if you were wondering

codeSupreme commented 7 years ago

@BendingUnit-22 how did you fix this? I'm having the same issue.

tmdvs commented 7 years ago

If you're using Swift you shouldn't need to import the class as it should be automatically available to you (see the example project).

Are you trying to bridge the Swift 3 version into an Objective-C project?

codeSupreme commented 7 years ago

I'm using Swift via a cocoa pod. But I'm trying to subclass it which is giving me the error.

On Wed, May 31, 2017 at 4:09 AM, Tim Davies notifications@github.com wrote:

If you're using Swift you shouldn't need to import the class as it should be automatically available to you (see the example project).

Are you trying to bridge the Swift 3 version into an Objective-C project?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tmdvs/TDBadgedCell/issues/74#issuecomment-305117612, or mute the thread https://github.com/notifications/unsubscribe-auth/AGeZcQ_Z0QNt6bGQrreXA0NooMfo04iqks5r_SBWgaJpZM4Mwg81 .

tmdvs commented 7 years ago

I added the following test subclass to the demo project and the project compiled without any issues. Can you confirm that CocoaPods is adding the class correctly? Are you able to use TDBagdedCell itself?

//  TestCellClass.swift

import UIKit

class TestCellClass: TDBadgedCell {

}
codeSupreme commented 7 years ago

Yes, the demo project would work fine because the TDBadgedCell.swift is in the project but once you use cocoapods to install the TDBadgedCell you will error out when trying to subclass.

On Thu, Jun 1, 2017 at 3:59 PM, Tim Davies notifications@github.com wrote:

I added the following test subclass to the demo project and the project compiled without any issues. Can you confirm that CocoaPods is adding the class correctly? Are you able to use TDBagdedCell itself?

// TestCellClass.swiftimport UIKit class TestCellClass: TDBadgedCell {

}

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tmdvs/TDBadgedCell/issues/74#issuecomment-305603687, or mute the thread https://github.com/notifications/unsubscribe-auth/AGeZcbRCegUNj21BIV0P9bm-LbxR9GEkks5r_xgKgaJpZM4Mwg81 .

ghost commented 7 years ago

I have excactly the same issue: I use the Swift version via Cocoapods and subclassing is not possible.

tmdvs commented 7 years ago

This sounds more like an issue with CocoaPods?

tmdvs commented 7 years ago

I've just released an update (2a0be57) which changes the control type to open. I believe this should expose the class for subclassing.

I'm also updating the pod, so feel free to run pod update.