//[self.slidingViewController resetTopView];
換VC,但不要讓VC縮往右邊
// [self.slidingViewController anchorTopViewOffScreenTo:ECRight animations:nil onComplete:^{
// CGRect frame = self.slidingViewController.topViewController.view.frame;
// self.slidingViewController.topViewController = newTopViewController;
// self.slidingViewController.topViewController.view.frame = frame;
// [self.slidingViewController resetTopView];
// }];
CGRect frame = self.slidingViewController.topViewController.view.frame;
self.slidingViewController.topViewController = newTopViewController;
self.slidingViewController.topViewController.view.frame = frame;
// [self.slidingViewController resetTopView];
不要讓topVC被拉過頭。
self.shouldAllowPanningPastAnchor = NO;
不要讓topVC可以被拖回原位。
self.resetStrategy = ECNone;
讓topVC往右移
[self.slidingViewController anchorTopViewTo:ECRight];
減少topVC往右移動時間
[UIView animateWithDuration:0.0f animations:^{
設定topVC往右移動位置
[self.slidingViewController setAnchorRightRevealAmount:100.0f];
.
No comments:
Post a Comment