zoukankan      html  css  js  c++  java
  • iOS5新开发的API总述

    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

  • 相关阅读:
    “家里养的花自杀了,遗书写道,一生不愁吃穿,唯独缺少阳光和爱。”——周国平 《爱与孤独》
    “在黑白里温柔地爱彩色,在彩色里朝圣黑白。”——汪曾祺
    “生命是有光的,在我熄灭以前,能够照亮你一点,就是我所有能做的了。我爱你,你要记得我。”                                           ——《云边有个小卖部》
    “那个人也许永远不会回来,那个人也许明天回来。”——《边城》
    杨绛《一百岁感言》
    成长就是承认“平凡”
    “我们都生活在稍微一不努力就会被淘汰的城市。看不透人心,说不尽的谎话,到处都充满了现实的味道!”
    坦白书里面写到我所有的自负都来自我的自卑,所有的英雄气概都来自于我内心的软弱,所有的振振有词,其实都是因为心中满是怀疑,我假装无情其实是痛恨自己的深情,我以为人生的意义在于四处浪荡流亡。
    轮播图
    简易贪吃蛇
  • 原文地址:https://www.cnblogs.com/linyawen/p/3114607.html
Copyright © 2011-2022 走看看