How to write Swift Protocol methods in Objective C -


i have file slider.swift , there protocol defined class parameter. want write methods in objective c in header file. how pass class parameter in protocols.

please help

public protocol sliderdelegate: class {     func slider(slider: slider, textwithvalue value: double) -> string      func sliderdidtap(slider: slider)     func slider(slider: slider, didchangevalue value: double)     func slider(slider: slider, didupdatefocusincontext context: uifocusupdatecontext, withanimationcoordinator coordinator: uifocusanimationcoordinator) }  public extension sliderdelegate {     func slider(slider: slider, textwithvalue value: double) -> string { return "\(int(value))" }      func sliderdidtap(slider: slider) {}     func slider(slider: slider, didchangevalue value: double) {}     func slider(slider: slider, didupdatefocusincontext context: uifocusupdatecontext, withanimationcoordinator coordinator: uifocusanimationcoordinator) {} }  @ibdesignable public class slider: uiview {  } 


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -