UIWindow *window = [[UIApplication sharedApplication] keyWindow];
CGFloat windowWidth = [UIScreen mainScreen].bounds.size.width;
CGFloat windowHeight = [UIScreen mainScreen].bounds.size.height;
CGFloat leftWidth = windowWidth * 0.64;
CGFloat zoomHeight = 20;
UIView *leftView = [[UIView alloc]initWithFrame:CGRectMake(-leftWidth, -zoomHeight, leftWidth, windowHeight + zoomHeight * 2)];
[leftView setBackgroundColor:[UIColor blueColor]];
[window addSubview:leftView];
CALayer *backLayer = [CALayer layer];
[backLayer setAnchorPoint:CGPointZero];
[backLayer setPosition:leftView.frame.origin];
[backLayer setBounds:CGRectMake(0, 0, windowWidth + CGRectGetWidth(leftView.frame), CGRectGetHeight(leftView.frame))];
[backLayer setBackgroundColor:[UIColor yellowColor].CGColor];
[window.layer insertSublayer:backLayer atIndex:0];
[UIView animateWithDuration:2 animations:^{
[window setBounds:CGRectMake(CGRectGetMinX(leftView.frame), 0, windowWidth, windowHeight - zoomHeight * 2)];
}];
//侧滑消失
UIWindow *window = [[UIApplication sharedApplication] keyWindow]
[UIView animateWithDuration:2 animations:^{
[window setBounds:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)]
}]