我一直在构建一个 iOS 应用程序,并希望创建您可以在 stripe 应用程序上看到的那种 View 。
视频:https://stripe.com/img/dashboard_iphone/screencast.mp4
在 0:06 秒,您可以看到,当您向上滑动时,下面的表格 View 进入 View ,而顶部的图表消失了。
我在很多应用程序中都看到过这种设计,但不确定是否存在使用 xCode 和 SDK 创建它的通用模式。
最佳答案
只需将其设置为图形 View 底部的动画即可。这是一个简单的例子:
CGRect frame = self.tableView.frame;
frame.origin.y = graphView.frame.origin.y + graphView.bounds.size.height;
frame.size.height = self.tableView.superview.bounds.size.height - frame.origin.y;
[UIView animateWithDuration:0.25f delay:0.0f options:UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseOut animations:^{
self.tableView.frame = frame;
} completion:NULL];
关于ios - Stripes iOS App 中使用的界面类型 iOS 界面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32113673/