03 2016 档案
如何判断UIPanGestureRecognizer的拖动方向
摘要:最近做一个项目,需要用到UIPanGestureRecognizer做一个侧滑菜单,需求是不能向右侧拖动(点击按钮右滑),但可以向左侧手势拖动收回;于是需要判断拖动的方向,百度了一下,网上大部分的答案是这样判断的: CGPoint translation = [recognizer translat
阅读全文
(转)如何为你的Viewcontroller瘦身
摘要:View controllers are often the biggest files in iOS projects, and they often contain way more code than necessary. Almost always, view controllers are
阅读全文
浙公网安备 33010602011771号