ios - Call ((Double)->())? in Swift -
i using library rating stars,so i'm trying reference of : public var didfinishtouchingcosmos: ((double)->())?
in view controller got reference of view :
@iboutlet var raitingview: cosmosview! var rating : double?
then in view controller viewdidload start using way :
raitingview.didfinishtouchingcosmos{rating in }
but i'm getting error cannot call value of non-function type
((double) ->())?
the library link here : https://github.com/marketplacer/cosmos
you should call function way. basic syntax can check introduction swift apple. recommend read swift tutorial apple through ibook store. free.
raitingview.didfinishtouchingcosmos = { rating in // want }
Comments
Post a Comment