Skip to content

CHNLiPeng/LIPSwipableView

Repository files navigation

LIPSwipableView

##A tinder like SwipableView, inspired by MDCSwipeToChoose. ##What it looks like?

##What is the different between LPSwipableView and MDCSwipeToChoose?

  • 1.You could Undo your manipulation。
  • 2.You could customize swipable direction(customizable) by setting the swipableDirections Property.
LIPSwipeToChooseViewOptions *options = [LIPSwipeToChooseViewOptions new];
   options.delegate = self;
   options.likedText = @"Keep";
   options.threshold = 160.f;
   options.swipableDirections= (LIPSwipeDirectionRight|LIPSwipeDirectionLeft|LIPSwipeDirectionUp);
   options.onPan = ^(LIPPanState *state){
       CGRect frame = [self backCardViewFrame];
       self.backCardView.frame = CGRectMake(frame.origin.x,
                                            frame.origin.y - (state.thresholdRatio * 10.f),
                                            CGRectGetWidth(frame),
                                            CGRectGetHeight(frame));
   };

About

A tinder like SwipableView

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published