全屏打开图片查看图片,然后滑动以关闭

时间:2015-09-29 17:52:16

标签: ios swift uiview uiswipegesturerecognizer

有关如何通过点击全屏打开图像,然后滑动以隐藏图像的任何建议?

1 个答案:

答案 0 :(得分:0)

建议:

*以编程方式添加视图并将其推送到堆栈。

//Code to recognize Tap 
let customView = MyCustomView(frame: CGRectZero(top: 0, left: 0, width: 200, height: 50) 
// Or desired dimensions
self.view.addSubview(customView)

*创建并添加SwipeGestureRecognizer

网址:developer.apple.com UITapGestureRecognizer Class

Url2:developer.apple.com UISwipeGestureRecognizer Class