为一个 view 添加手势之后传参
1.传一个参数 tag值来帮忙
tapGesture.view.tag = [obj[@"userId"] integerValue];
UIGestureRecognizer *tap = (UIGestureRecognizer *)sender;
UIView *view = (UIView *)tap.view;
NSInteger tag = view.tag;
2.传两个参数 userInfo来帮忙 (参考button 传多个参数值)
3.NSArray 去重小技
4.验证邮箱
Paste_Image.png
5.验证手机号
6.跳转到FaceTime 音乐墙纸设置等
Paste_Image.png Paste_Image.png
About — prefs:root=General&path=About
Accessibility — prefs:root=General&path=ACCESSIBILITY
Airplane Mode On — prefs:root=AIRPLANE_MODE
Auto-Lock — prefs:root=General&path=AUTOLOCK
Brightness — prefs:root=Brightness
Bluetooth — prefs:root=General&path=Bluetooth
Date & Time — prefs:root=General&path=DATE_AND_TIME
FaceTime — prefs:root=FACETIME
General — prefs:root=General
Keyboard — prefs:root=General&path=Keyboard
iCloud — prefs:root=CASTLE
iCloud Storage & Backup — prefs:root=CASTLE&path=STORAGE_AND_BACKUP
International — prefs:root=General&path=INTERNATIONAL
Location Services — prefs:root=LOCATION_SERVICES
Music — prefs:root=MUSIC
Music Equalizer — prefs:root=MUSIC&path=EQ
Music Volume Limit — prefs:root=MUSIC&path=VolumeLimit
Network — prefs:root=General&path=Network
Nike + iPod — prefs:root=NIKE_PLUS_IPOD
Notes — prefs:root=NOTES
Notification — prefs:root=NOTIFICATIONS_ID
Phone — prefs:root=Phone
Photos — prefs:root=Photos
Profile — prefs:root=General&path=ManagedConfigurationList
Reset — prefs:root=General&path=Reset
Safari — prefs:root=Safari
Siri — prefs:root=General&path=Assistant
Sounds — prefs:root=Sounds
Software Update — prefs:root=General&path=SOFTWARE_UPDATE_LINK
Store — prefs:root=STORE
Twitter — prefs:root=TWITTER
Usage — prefs:root=General&path=USAGE
VPN — prefs:root=General&path=Network/VPN
Wallpaper — prefs:root=Wallpaper
Wi-Fi — prefs:root=WIFI
8.iOS 实现带文本输入框的UIAlertView及获取TextField文本内容
Paste_Image.png Paste_Image.png Paste_Image.png9.判断有没有代开定位服务
Paste_Image.png
10.键盘出现时UITextField上移
点击UITextField之后,视图上移。
一些textfield在键盘显示出来的时候会被挡住,所以在编辑textfield我们可以把视图上移。
SWIFT 版
OC 版
Paste_Image.png
网友评论