0

目前,在我见过的任何 iOS 应用程序中,从栏选项卡或通过向左或向右滑动访问侧视图,主视图向左或向右移动,“暴露”底层视图。是否有可能当用户向左或向右滑动时,主视图会停留在那里,但侧视图会拖到主视图上?

4

1 回答 1

0

尝试这个:

    - (IBAction)inputTileButton_TouchUpInside:(id)sender {


    if([inputTileButton isSelected]) {
        [Utility_Class AnimateViewToFrame:inputViewHiddenRect referenceView:rmHomeInputViewController.view];
        [inputTileButton setSelected:NO];
    }
    else {
        [Utility_Class AnimateViewToFrame:inputViewVisibleRect referenceView:rmHomeInputViewController.view];
        [inputTileButton setSelected:YES];
    }
}


+(void)AnimateViewToFrame:(CGRect)rect referenceView:(UIView *)view{

    if (!CGRectEqualToRect(view.frame,rect)) {
        [UIView animateWithDuration:kANIMATION_DURATION animations:^{
            [view setFrame:rect];

        } completion:^(BOOL completion){

        }];
    }

}
于 2013-05-30T07:05:05.633 回答