其實做外包也是挺不錯,雖然累點,但是一天天的知識的擴展不少,下面是今天的收獲
①初始化數組一字典的方法
@[] 初始化不可變數組
@{} 初始化不可變字典
②手勢的使用
iOS中處理手勢之前是用四個方法:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
UITapGestureRecognizer
//點擊(可以設置點擊次數)
UIPinchGestureRecognizer //二指往內或往外撥動,平時經常用到的縮放
UIRotationGestureRecognizer //旋轉
UISwipeGestureRecognizer //滑動,快速移動
UIPanGestureRecognizer
//拖移,慢速移動
UILongPressGestureRecognizer
//長按
使用: