ios7 tweak
来源:互联网 发布:ubuntu 13.04安装失败 编辑:程序博客网 时间:2024/06/10 16:18
[UIView setAnimationsEnabled:NO];
code here...
[UIView setAnimationsEnabled:YES];
2.实现tableView:estimatedHeightForRowAtIndexPath:代理函数或者设置estimatedRowHeight属性值,提供一个预估高度值,
对于可变高度的cell的表格视图可改进性能
3.UISearchDisplayController新增属性:displaysSearchBarInNavigationBar,可让搜索控件显示在导航栏,但不可与showsScopeBar同时设置为YES,即显示在导航栏的搜索控件不能有范围选择栏
4.UIResponder新增属性keyCommands,相应的有个新增类UIKeyCommand,可用于捕获蓝牙键盘的按键事件,例:
- (NSArray *)keyCommands { return @[[UIKeyCommand keyCommandWithInput:@"f" modifierFlags:UIKeyModifierCommand action:@selector(searchKeyPressed:)]];}- (void)searchKeyPressed:(UIKeyCommand *)keyCommand { // Respond to the event}
5.新增UIInputView,可用来自定义键盘或者扩展默认键盘
6.CTTelephonyNetworkInfo:用来判断手机当前的网络类型,是edge还是LTE或其他,currentRadioAccessTechnology的值可为:
CTRadioAccessTechnologyCDMA1x
CTRadioAccessTechnologyCDMAEVDORev0
CTRadioAccessTechnologyCDMAEVDORevA
CTRadioAccessTechnologyCDMAEVDORevB
CTRadioAccessTechnologyEdge
CTRadioAccessTechnologyGPRS
CTRadioAccessTechnologyHSDPA
CTRadioAccessTechnologyHSUPA
CTRadioAccessTechnologyLTE
CTRadioAccessTechnologyWCDMA
CTRadioAccessTechnologyeHRPD
CTTelephonyNetworkInfo *telephonyInfo = [CTTelephonyNetworkInfo new];NSLog(@"Current Radio Access Technology: %@", telephonyInfo.currentRadioAccessTechnology);[NSNotificationCenter.defaultCenter addObserverForName:CTRadioAccessTechnologyDidChangeNotification object:nil queue:nil usingBlock:^(NSNotification *note) { NSLog(@"New Radio Access Technology: %@", telephonyInfo.currentRadioAccessTechnology);}];
7.下载字体:CTFontDescriptorMatchFontDescriptorsWithProgressHandler
获取可下载字体:
CFDictionary *descriptorOptions = @{(id)kCTFontDownloadableAttribute : @YES};CTFontDescriptorRef descriptor = CTFontDescriptorCreateWithAttributes((CFDictionaryRef)descriptorOptions);CFArrayRef fontDescriptors = CTFontDescriptorCreateMatchingFontDescriptors(descriptor, NULL);
Tint images with UIImage.renderingMode
UIImage *img = [UIImage imageNamed:@"myimage"];img = [img imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
新增UIApplicationUserDidTakeScreenshotNotification通知,当用户截屏时触发
UIScreenEdgePanGestureRecognizer
UIScreenEdgePanGestureRecognizer *recognizer = [[UIScreenEdgePanGestureRecognizer alloc] initWithTarget:self action:@selector(handleScreenEdgeRecognizer:)];recognizer.edges = UIRectEdgeLeft;[self.view addGestureRecognizer:recognizer];
keyboardDismissMode:scrollView滚动时隐藏键盘
self.scrollView.keyboardDismissMode =UIScrollViewKeyboardDismissModeOnDrag;//刚拖动scrollView就隐藏键盘
self.scrollView.keyboardDismissMode =UIScrollViewKeyboardDismissModeInteractive;//从键盘上面点(scrollView未遮挡部分)向下滑动,键盘会跟着滑动;又往上滑动键盘也会跟着向上滑动
UIScrollViewKeyboardDismissModeNone//默认值,没有任何影响
参考网址:http://www.objc.io/issue-5/iOS7-hidden-gems-and-workarounds.html
- ios7 tweak
- ubuntu-tweak
- Tweak工程
- elementary-tweak
- iOS7
- iOS7
- ios7
- iOS7
- 何谓Tweak-GUI?
- Ubuntu: 配置工具Tweak
- 如何安装Ubuntu Tweak
- Ubuntu安装Tweak
- 4常用软件 --Ubuntu Tweak
- Ubuntu tweak ppa 安装
- 安装ubuntu-tweak
- Unity Tweak Tool:MyUnity
- Unity Tweak Tool使用
- Ubuntu Tweak使用
- java类的初始化顺序
- EviaEarth解析WKT的代码示例
- 在刚启电脑时启动Navicat for MySql后连接mysql时报ERROR 2003 (HY000): Can't connect to MySQL server on 'localhos错误
- poj 1321 棋盘数组
- LVS技术总体分析
- ios7 tweak
- LCA问题(含RMQ的ST算法)
- _IO, _IOR, _IOW, _IOWR 宏的用法与解析
- 当程序员难,当初级程序员(菜鸟都不是的)更难
- C#异常处理新手学习
- 网络流,最基础的增广路算法!
- Opencv中的数据存储(1)
- HTML5 WebSocket的使用及例子
- QMainWindow动态切换CentralWidget