Nabil El
Nabil El

Reputation: 972

Call objective blocks in a swift class

I'm trying to use an objective C library, in a objective C i'm using it like this :

 [animationView setDraggingMovedBlock:^(UIView * view){
   //some code
}];

I don't know how to call it in a swift class.

Upvotes: 0

Views: 61

Answers (1)

sanjaykmwt
sanjaykmwt

Reputation: 605

you can try this:

  animationView.draggingMovedBlock = {(_ view: UIView?) -> Void in
     //some code
  }

Upvotes: 2

Related Questions