ios - Is there any way to persist a Swift closure? -
i need persist closure doesn't seem possible persistence methods available in swift , can't seem find information.
since "code" part of closure fixed (compiled) there no need persist it, need keep reference keyword or other identifier. can achieved using dictionary references functions example (i.e. factory of functions).
what needs persistence variables captured closure. equivalent parameters of function.
so basically, should approach problem differently , define set of function keywords , parameter lists. can persist , later "execute" data passing parameters factory of functions associated keywords.
Comments
Post a Comment