• 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

  • 相关阅读:
    如何使用ASP.NET2.0的“嵌入的资源”
    多核心计算机运算
    [翻译]注册协议(Register Protocol)
    [翻译]关于“异步可插协议”(About Asynchronous Pluggable Protocols(APPs))
    [ASP.NET]runat="server" causes the problem (< or &lt;)
    [翻译]将应用程序注册为URL协议(Registering an Application to a URL Protocol)
    【C# 转换编码格式】 唉,总是忘记的一个方法。
    在WinForm中借助WebBrowser控件使用 tinymce 总结
    sqlite 资料整理(一)
    sqlite 性能优化
  • 原文地址:https://www.cnblogs.com/linyawen/p/3114607.html
Copyright © 2020-2023  润新知