- 浏览: 38963 次
- 性别:
- 来自: 北京
最新评论
转自 http://alloc.sinaapp.com/?p=208
iOS5发布了好长时间,一直没有时间好好看一下,从今天开始重新学一下WWDC2011,以便了解一下iOS5的新功能.
此篇只简单介绍一下iOS新的API.参考官方1-01 Session 100 – What’s New in Cocoa Touch.
1.UIStepper
iOS5新UI控件,用来数字输入.
2.UIAlertView新样式
typedef enum {
UIAlertViewStyleDefault = 0,
UIAlertViewStyleSecureTextInput,//密码输入框
UIAlertViewStylePlainTextInput,//一般输入框
UIAlertViewStyleLoginAndPasswordInput//两个输入框
} UIAlertViewStyle;
@property(nonatomic,assign) UIAlertViewStyle alertViewStyle;
- (UITextField *)textFieldAtIndex:(NSInteger)textFieldIndex
3.TV
4.UIScreen调节亮度
@property (nonatomic) CGFloat brightness;
@property (nonatomic) BOOL wantsSoftwareDimming;
5.UIScrollView delegate完成拖动时delegate
- (void)scrollViewWillEndDragging:(UIScrollView *)sv withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)tCO;
6.UIReferenceLibraryViewController显示词语解释
- (id)initWithTerm:(NSString *)term;
+ (BOOL)dictionaryHasDefinitionForTerm:(NSString *)term;
7.UISplitViewController delegate,显示隐藏时delegate
- (BOOL)splitViewController:(UISplitViewController *)svc shouldHideViewController:(UIViewController *)vc inOrientation:(UIInterfaceOrientation)orientation;
8.UITableView delegate,复制或剪切cell时delegate
- (BOOL)tableView:(UITableView *)tv shouldShowMenuForRowAtIndexPath:(NSIndexPath *)ip;
- (BOOL)tableView:(UITableView *)tv canPerformAction:(SEL)action forRowAtIndexPath:(NSIndexPath *)ip;
- (void)tableView:(UITableView *)tv performAction:(SEL)action forRowAtIndexPath:(NSIndexPath *)indexPath;
9.UITableViewCell,从xib文件中获取cell
- (void)registerNib:(UINib *)nib forCellReuseIdentifier:(NSString *)identifier;
10.UIWindow keyboard notifications,键盘frame改变时notifications
NSString *const UIKeyboardWillChangeFrameNotification;
NSString *const UIKeyboardDidChangeFrameNotification;
11.UIImage,image动画
+ (UIImage *)animatedImageNamed:(NSString *)name duration:(NSTimeInterval)duration;
+ (UIImage *)animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval)duration;
@property (nonatomic, readonly) NSArray *images;
@property (nonatomic, readonly) NSTimeInterval duration;
image平铺与拉伸
-(UIImage *)resizableImageWithCapInsets:(UIEdgeInsets)i;
12.UIStoryboard,故事版
@property (readonly, retain) UIStoryboard *storyboard;
- (void)performSegueWithIdentifier:(NSString *)id sender:(id)sender;
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender;
13.UISlider,改变颜色
[aSlider setMinimumTrackTintColor:[UIColor redColor]];
14.UIAppearance应用于全部属性
@protocol UIAppearance <NSObject>
+ (id)appearance; ...
@end #define UI_APPEARANCE_SELECTOR
eg:
[[UISlider appearance] setMinimumTrackTintColor: [UIColor redColor]];//程序中所有slider改为红色
15.UIPageViewController
- (id)initWithTransitionStyle: (UIPageViewControllerTransitionStyle)style navigationOrientation:(UIPageViewControllerNavigationOrientation)orientation options:(NSDictionary *)options;
id <UIPageViewControllerDelegate> delegate;
id <UIPageViewControllerDataSource> dataSource;
UIPageViewControllerDelegate
- (void)pageViewController:(UIPageViewController *)pvc didFinishAnimating:(BOOL)finished previousViewControllers:(NSArray *)prevViewCs transitionCompleted:(BOOL)completed;
- (UIPageViewControllerSpineLocation) pageViewController:(...)pvc spineLocationForInterfaceOrientation:(...)o;
UIPageViewControllerDataSource
- (UIViewController *) pageViewController:(UIPageViewController *)pvc viewControllerBeforeViewController:(UIViewController*)c;
- (UIViewController *) pageViewController:(UIPageViewController *)pvc viewControllerAfterViewController:(UIViewController *)c;
16.UIViewController
-(void)addChildViewController:(UIViewController *)cvc;
-(void)removeFromParentViewController;
@property (readonly) NSArray *childViewControllers;
-(void)transitionFromViewController:(UIViewController *)fVC toViewController:(UIViewController *)toViewController duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion;
17.UIDocument
- (id)initWithFileURL:(NSURL *)url;
@property (readonly) NSURL *fileURL;
@property (readonly, copy) NSString *localizedName;
@property (readonly, copy) NSString *fileType;
@property (copy) NSDate *fileModificationDate;
@property (retain) NSUndoManager *undoManager;
- (void)openWithCompletionHandler: (void (^)(BOOL success))completionHandler;
- (void)closeWithCompletionHandler: (void (^)(BOOL success))completionHandler;
- (BOOL)loadFromContents:(id)contents ofType:(NSString *)typeName error:(NSError **)outError;
- (id)contentsForType:(NSString *)typeName error:(NSError **)outError;
Errors
- (void)handleError:(NSError *)error userInteractionPermitted:(BOOL)interactionPermitted;
- (void)finishedHandlingError:(NSError *)error recovered:(BOOL)recovered;
- (void)userInteractionNoLongerPermittedForError: (NSError *)error;
Document States
enum { UIDocumentStateNormal,
UIDocumentStateClosed = 1 << 0,
UIDocumentStateInConflict = 1 << 1,
UIDocumentStateSavingError = 1 << 2,
UIDocumentStateEditingDisabled = 1 << 3
}; typedef NSInteger UIDocumentState;
@property (readonly) UIDocumentState documentState;
NSString *const UIDocumentStateChangedNotification;
18.管理资源库(没看懂)
• ALAssetsLibrary
- (void)addAssetsGroupAlbumWithName:(NSString *)name resultBlock:(ALAssetsLibraryGroupResultBlock)r;
• ALAssetsGroup
- (BOOL)addAsset:(ALAsset *)asset;
Modifying
-(void)writeModifiedImageDataToSavedPhotosAlbum:(NSData *)d metadata:(NSDictionary *)metadata completionBlock:(ALAssetsLibraryWriteImageCompletionBlock)block;
-(void)setImageData:(NSData *)data metadata:(NSDictionary *)metadata completionBlock:(ALAssetsLibraryWriteImageCompletionBlock)block;
19.其他
GameKit
Core Data
NewsstandKit
Twitter
CoreImage
GLKit
iOS5发布了好长时间,一直没有时间好好看一下,从今天开始重新学一下WWDC2011,以便了解一下iOS5的新功能.
此篇只简单介绍一下iOS新的API.参考官方1-01 Session 100 – What’s New in Cocoa Touch.
1.UIStepper
iOS5新UI控件,用来数字输入.
2.UIAlertView新样式
typedef enum {
UIAlertViewStyleDefault = 0,
UIAlertViewStyleSecureTextInput,//密码输入框
UIAlertViewStylePlainTextInput,//一般输入框
UIAlertViewStyleLoginAndPasswordInput//两个输入框
} UIAlertViewStyle;
@property(nonatomic,assign) UIAlertViewStyle alertViewStyle;
- (UITextField *)textFieldAtIndex:(NSInteger)textFieldIndex
3.TV
4.UIScreen调节亮度
@property (nonatomic) CGFloat brightness;
@property (nonatomic) BOOL wantsSoftwareDimming;
5.UIScrollView delegate完成拖动时delegate
- (void)scrollViewWillEndDragging:(UIScrollView *)sv withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)tCO;
6.UIReferenceLibraryViewController显示词语解释
- (id)initWithTerm:(NSString *)term;
+ (BOOL)dictionaryHasDefinitionForTerm:(NSString *)term;
7.UISplitViewController delegate,显示隐藏时delegate
- (BOOL)splitViewController:(UISplitViewController *)svc shouldHideViewController:(UIViewController *)vc inOrientation:(UIInterfaceOrientation)orientation;
8.UITableView delegate,复制或剪切cell时delegate
- (BOOL)tableView:(UITableView *)tv shouldShowMenuForRowAtIndexPath:(NSIndexPath *)ip;
- (BOOL)tableView:(UITableView *)tv canPerformAction:(SEL)action forRowAtIndexPath:(NSIndexPath *)ip;
- (void)tableView:(UITableView *)tv performAction:(SEL)action forRowAtIndexPath:(NSIndexPath *)indexPath;
9.UITableViewCell,从xib文件中获取cell
- (void)registerNib:(UINib *)nib forCellReuseIdentifier:(NSString *)identifier;
10.UIWindow keyboard notifications,键盘frame改变时notifications
NSString *const UIKeyboardWillChangeFrameNotification;
NSString *const UIKeyboardDidChangeFrameNotification;
11.UIImage,image动画
+ (UIImage *)animatedImageNamed:(NSString *)name duration:(NSTimeInterval)duration;
+ (UIImage *)animatedImageWithImages:(NSArray *)images duration:(NSTimeInterval)duration;
@property (nonatomic, readonly) NSArray *images;
@property (nonatomic, readonly) NSTimeInterval duration;
image平铺与拉伸
-(UIImage *)resizableImageWithCapInsets:(UIEdgeInsets)i;
12.UIStoryboard,故事版
@property (readonly, retain) UIStoryboard *storyboard;
- (void)performSegueWithIdentifier:(NSString *)id sender:(id)sender;
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender;
13.UISlider,改变颜色
[aSlider setMinimumTrackTintColor:[UIColor redColor]];
14.UIAppearance应用于全部属性
@protocol UIAppearance <NSObject>
+ (id)appearance; ...
@end #define UI_APPEARANCE_SELECTOR
eg:
[[UISlider appearance] setMinimumTrackTintColor: [UIColor redColor]];//程序中所有slider改为红色
15.UIPageViewController
- (id)initWithTransitionStyle: (UIPageViewControllerTransitionStyle)style navigationOrientation:(UIPageViewControllerNavigationOrientation)orientation options:(NSDictionary *)options;
id <UIPageViewControllerDelegate> delegate;
id <UIPageViewControllerDataSource> dataSource;
UIPageViewControllerDelegate
- (void)pageViewController:(UIPageViewController *)pvc didFinishAnimating:(BOOL)finished previousViewControllers:(NSArray *)prevViewCs transitionCompleted:(BOOL)completed;
- (UIPageViewControllerSpineLocation) pageViewController:(...)pvc spineLocationForInterfaceOrientation:(...)o;
UIPageViewControllerDataSource
- (UIViewController *) pageViewController:(UIPageViewController *)pvc viewControllerBeforeViewController:(UIViewController*)c;
- (UIViewController *) pageViewController:(UIPageViewController *)pvc viewControllerAfterViewController:(UIViewController *)c;
16.UIViewController
-(void)addChildViewController:(UIViewController *)cvc;
-(void)removeFromParentViewController;
@property (readonly) NSArray *childViewControllers;
-(void)transitionFromViewController:(UIViewController *)fVC toViewController:(UIViewController *)toViewController duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion;
17.UIDocument
- (id)initWithFileURL:(NSURL *)url;
@property (readonly) NSURL *fileURL;
@property (readonly, copy) NSString *localizedName;
@property (readonly, copy) NSString *fileType;
@property (copy) NSDate *fileModificationDate;
@property (retain) NSUndoManager *undoManager;
- (void)openWithCompletionHandler: (void (^)(BOOL success))completionHandler;
- (void)closeWithCompletionHandler: (void (^)(BOOL success))completionHandler;
- (BOOL)loadFromContents:(id)contents ofType:(NSString *)typeName error:(NSError **)outError;
- (id)contentsForType:(NSString *)typeName error:(NSError **)outError;
Errors
- (void)handleError:(NSError *)error userInteractionPermitted:(BOOL)interactionPermitted;
- (void)finishedHandlingError:(NSError *)error recovered:(BOOL)recovered;
- (void)userInteractionNoLongerPermittedForError: (NSError *)error;
Document States
enum { UIDocumentStateNormal,
UIDocumentStateClosed = 1 << 0,
UIDocumentStateInConflict = 1 << 1,
UIDocumentStateSavingError = 1 << 2,
UIDocumentStateEditingDisabled = 1 << 3
}; typedef NSInteger UIDocumentState;
@property (readonly) UIDocumentState documentState;
NSString *const UIDocumentStateChangedNotification;
18.管理资源库(没看懂)
• ALAssetsLibrary
- (void)addAssetsGroupAlbumWithName:(NSString *)name resultBlock:(ALAssetsLibraryGroupResultBlock)r;
• ALAssetsGroup
- (BOOL)addAsset:(ALAsset *)asset;
Modifying
-(void)writeModifiedImageDataToSavedPhotosAlbum:(NSData *)d metadata:(NSDictionary *)metadata completionBlock:(ALAssetsLibraryWriteImageCompletionBlock)block;
-(void)setImageData:(NSData *)data metadata:(NSDictionary *)metadata completionBlock:(ALAssetsLibraryWriteImageCompletionBlock)block;
19.其他
GameKit
Core Data
NewsstandKit
CoreImage
GLKit
发表评论
-
IOS
2012-06-08 18:08 2186转自 http://site.douban.com/ ... -
iPhone4文件结构分析列表
2012-06-06 18:25 11、 【/Applications】 ... -
IOS 入门开发之使用Xcode4制作静态库详解
2012-05-23 16:40 1207雨松MOMO原创文章如转载,请注明:转载自雨松MOMO的博客原 ... -
NSError code错误列表信息(NSFileManage、NSURL...)
2012-05-14 13:05 2613NSError codes in the Cocoa erro ... -
iOS4中Core Motion框架的介绍和使用
2012-04-18 20:47 936http://www.kunli.info/2010/07/3 ... -
中文版多线程编程指南
2012-03-19 19:33 971转自http://www.cocoachina.com/iph ... -
iPhone 路径大全
2012-03-13 11:41 9751、【/Applications】 常用 ... -
App Store审核指南
2012-03-08 19:19 967前言 感谢您付出宝 ... -
iOS设备型号与产品名称的对应
2012-03-07 21:47 2369"iPhone1,1" => &qu ... -
gzip文件的解压缩
2012-03-07 10:21 1429to allow zlib compression/decom ... -
iOS平台开发者总结出的宝贵上架经验
2012-03-06 16:06 1111以下是许多iOS平台开发者总结出的宝贵上架经验: 基本 ... -
版本控制清除所有.svn目录
2012-02-29 18:04 1579删除这些目录是很简单的,命令如下find . -type d ... -
UIView的一些基本方法理解:loadView、viewDidLoad、viewDidUnload、viewWillAppear、viewWillDisapp
2012-02-29 15:51 1820对于其它几个基本方法就不那么常用了,为了更好地编程使用这些方法 ... -
iphone音乐播放
2012-02-28 14:20 1299在 iPhone 应用或者是游戏的开发过程中,对声音的支持是必 ... -
Zlib的deflate, z_stream结构的使用
2012-02-20 22:52 3693Zlib的deflate, z_stream结构的 ... -
iphone通讯录AddressBook.framework和AddressBookUI.framework的应用
2012-02-02 12:26 3200通讯录中联系人相关的应用iPhone提供了两个框架:Ad ...
相关推荐
二、总述————————————————————————-2 1、作者的话——————————————————————--2 2、设计提要———————————————————————3 三、各零部件的设计及...
碳中和碳达峰系列研究之总述篇:双碳下的“双新”趋势 本研究报告对中国的碳中和碳达峰行动的发展趋势进行了深入分析和研究。报告认为,整个“双碳”行动将会按“双新”的趋势有序推进,即“新能源”与“新电气化...
### Android项目开发总述快速入门知识点详述 #### 一、Android应用与开发环境搭建 Android,作为全球最广泛使用的移动操作系统之一,为开发者提供了丰富的工具和资源来创建高质量的应用程序。开发Android应用前,...
软件工程总述 软件工程是指采用工程的概念、原理、技术和方法来开发和维护软件,将工程管理技术成功的经验和思想与具体软件的开发过程、研究技术相结合,形成一整套适合于计算机软件开发的方法、规范和技术。软件...
Java 主流开发环境与工具总述与比较 Java 语言从诞生之日起经历了多次的磨砺与蜕变,已成为当今最流行、最通用的软件开发语言之一,是许多专业人士首选的开发语言。为了更好的了解和学习 Java 语言,本文针对 Java ...
串行接口总述,详细描述串口接口,望补充。
《车主通平台与OBD系统接口综合协议Ver1.0——弃用1》 本文档详细介绍了车主通平台与OBD(On-Board Diagnostics)系统之间的接口交互规范,主要用于实现车辆状态监控、安全控制和故障诊断等功能。该协议基于...
5. 协同开发环境(CDEs) 从2005年开始,随着敏捷开发和DevOps理念的兴起,协同开发环境成为主流。例如,IntelliJ IDEA和Git等工具的出现,促进了团队间的代码共享、版本控制和持续集成。现代CDEs还强调自动化测试、...
20210809-招商银行-新能源行业碳中和碳达峰系列研究之总述篇:双碳下的“双新”趋势.pdf
【银联在线支付接口API】是中国银联提供的一套用于在线支付的服务,允许开发者通过集成特定的API,实现用户在网站或应用上便捷地进行支付操作。这些接口通常支持多种编程语言,包括C,C#,Java等,以满足不同平台和...
5. **make 的工作方式** —— `make` 从上到下读取规则,根据依赖关系决定执行哪些命令。 编写 Makefile 需要理解编译原理和 `make` 的语法特性。熟练掌握 Makefile 能显著提高软件项目的构建效率,使开发者更专注...
在 HarmonyOS 和 OpenHarmony 应用开发中,Canvas 组件是用于图形绘制的重要工具,而 CanvasRenderingContext2D 是一个核心对象,它提供了丰富的接口来实现各种图形的绘制。这个对象允许开发者在 Canvas 上绘制矩形...
Micropython研究记录:一、Linux下STM32编译环境的搭建——步骤总述-附件资源
【校外实习总述】——会计学视角下的污水处理厂实习 本次校外实习的地点是一汽污水处理厂,这是一家具有悠久历史的工厂,始建于1983年,并在1987年正式完工运营。该厂的主要任务是处理一汽集团的生活污水和工业污水...