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

Cannot find protocol declaration for 'SectionedSliderDelegate' #6

Closed
behrad-kzm opened this issue Nov 16, 2017 · 2 comments
Closed

Comments

@behrad-kzm
Copy link

behrad-kzm commented Nov 16, 2017

I Installed using pods on Objective-C Project.
The SectionedSliderDelegate not founded in <SectionedSlider/SectionedSlider-Swift.h>

After that I removed from pods list and added manually to the project and the result was same.
in myproject-Swift.h:

SWIFT_CLASS("_TtC11gogoMessage15SectionedSlider")
@interface SectionedSlider : UIView
@property (nonatomic, strong) UIColor * _Nullable viewBackgroundColor;
@property (nonatomic, strong) UIColor * _Nullable sliderBackgroundColor;
@property (nonatomic, strong) UIColor * _Nullable sliderColor;
@property (nonatomic) NSInteger sections;
@property (nonatomic) NSInteger selectedSection;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) Class _Nonnull layerClass;)
+ (Class _Nonnull)layerClass SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
- (void)awakeFromNib;
- (void)drawLayer:(CALayer * _Nonnull)layer inContext:(CGContextRef _Nonnull)ctx;
- (void)draw;
- (void)needsDisplay;
- (void)touchesBegan:(NSSet<UITouch *> * _Nonnull)touches withEvent:(UIEvent * _Nullable)event;
- (void)touchesMoved:(NSSet<UITouch *> * _Nonnull)touches withEvent:(UIEvent * _Nullable)event;
@end


SWIFT_CLASS("_TtC11gogoMessage20SectionedSliderLayer")
@interface SectionedSliderLayer : CALayer
@property (nonatomic) CGFloat factor;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithLayer:(id _Nonnull)layer OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end


SWIFT_CLASS("_TtC11gogoMessage8StyleKit")
@interface StyleKit : NSObject
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

typedef SWIFT_ENUM_NAMED(NSInteger, SectionedSliderResizingBehavior, "ResizingBehavior") {
  SectionedSliderResizingBehaviorAspectFit = 0,
/// The content is proportionally resized to fit into the target rectangle.
  SectionedSliderResizingBehaviorAspectFill = 1,
/// The content is proportionally resized to completely fill the target rectangle.
  SectionedSliderResizingBehaviorStretch = 2,
/// The content is stretched to match the entire target rectangle.
  SectionedSliderResizingBehaviorCenter = 3,
};

As you see there is no property named delegate.
I don't know why it wasn't Imported
Any Idea?

@LeonardoCardoso
Copy link
Owner

LeonardoCardoso commented Nov 18, 2017

Try to add this @objc before the protocol signature:

@objc public protocol SectionedSliderDelegate {   
	func sectionChanged(slider: SectionedSlider, selected: Int)   
}

If this works for you, I will release a new version with this fix.

@LeonardoCardoso
Copy link
Owner

Closed due to the lack of response.

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