1.UIStepper
iOS5新UI控制項,用來數字輸入.
2.UIAlertView新樣式
typedef enum { UIAlertViewStyleDefault = 0, UIAlertViewStyleSecureTextInput,//密碼輸入框 UIAlertViewStylePlainTextInput,//一般輸入框 UIAlertViewStyleLoginAndPasswordInput//兩個輸入框 } UIAlertViewStyle; @property(nonatomic,assign) UIAlertViewStyle alertViewStyle; - (UITextField *)textFieldAtIndex:(NSInteger)textFieldIndex3.TV4.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