※本記事は、旧ブログからの再掲です。

自分用のメモとして Deprecated Methods を書いてます。
私が開発中に知ったものから書いていくので、網羅性はないと思います。。。
今後新たに知った時には、その都度追記していく予定です。

赤文字の取消線が付いているメソッドが非推奨となったもので、代わりに使用するメソッドをその下に書いてます。

Deprecated in iOS 7.0

・UIViewController プロパティ
wantsFullScreenLayout
contentSizeForViewInPopover

・UIColor System Color
scrollViewTexturedBackgroundColor
underPageBackgroundColor
viewFlipsideBackgroundColor

 

Deprecated in iOS 6.0

・画面をモーダルとして呼び出すメソッド
– (void)presentModalViewController:(UIViewController *)modalViewController animated:(BOOL)animated
↓
– (void)presentViewController:(UIViewController *)viewControllerToPresent animated:(BOOL)flag completion:(void (^)(void))completion
※iOS5.0以降

・モーダルとして呼び出された画面を閉じるメソッド
– (void)dismissModalViewControllerAnimated:(BOOL)animated
↓
– (void)dismissViewControllerAnimated:(BOOL)flag completion:(void (^)(void))completion
※iOS5.0以降

・画面回転時に呼び出されるメソッド
– (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
↓
– (NSUInteger)supportedInterfaceOrientations
and
– (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
※iOS6.0以降
上記2メソッド以外に – (BOOL)shouldAutorotate も必要。

・低メモリ警告時に呼び出されるメソッド
– (void)viewWillUnload
↓
なし
(didReceiveMemoryWarningメソッドでメモリ解放処理を行う)

– (void)viewDidUnload
↓
なし
(didReceiveMemoryWarningメソッドでメモリ解放処理を行う)

・AdBannerViewのサイズ設定メソッド
+ (CGSize)sizeFromBannerContentSizeIdentifier:(NSString *)contentSizeIdentifier
↓
なし

・AdBannerViewのサイズプロパティ
requiredContentSizeIdentifiers
↓
なし

currentContentSizeIdentifier
↓
なし

・requiredContentSizeIdentifiers/currentContentSizeIdentifierプロパティ用の定義
ADBannerContentSizeIdentifierPortrait
ADBannerContentSizeIdentifierLandscape
↓
なし

・UILabel 最小フォントサイズ プロパティ
minimumFontSize
↓
minimumScaleFactor
※iOS6.0以降

・UILabel textalignmentプロパティ用の定義
UITextAlignmentLeft
UITextAlignmentCenter
UITextAlignmentRight
↓
NSTextAlignmentLeft
NSTextAlignmentCenter
NSTextAlignmentRight
NSTextAlignmentJustified (新しく追加)
NSTextAlignmentNatural (新しく追加)
※iOS6.0以降

・改行モード用の定義
UILineBreakModeWordWrap
UILineBreakModeCharacterWrap
UILineBreakModeClip
UILineBreakModeHeadTruncation
UILineBreakModeTailTruncation
UILineBreakModeMiddleTruncation
↓
NSLineBreakByWordWrapping   // Wrap at word boundaries, default
NSLineBreakByCharWrapping   // Wrap at character boundaries
NSLineBreakByClipping      // Simply clip
NSLineBreakByTruncatingHead   // Truncate at head of line: “…wxyz”
NSLineBreakByTruncatingTail   // Truncate at tail of line: “abcd…”
NSLineBreakByTruncatingMiddle  // Truncate middle of line: “ab…yz”
※iOS6.0以降

・Twitterを利用する時のクラス
TWTweetComposeViewController
↓
SLComposeViewController
※iOS6.0以降

 

Deprecated in iOS 5.0

・SSL接続時等認証が必要なときに呼び出されるメソッド
– (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace
– (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
– (void)connection:(NSURLConnection *)connection didCancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
↓
– (void)connection:(NSURLConnection *)connection willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
※iOS5.0以降

 

<参考>
・[Appleドキュメント] iOS 8.1 Release Notes
・[Appleドキュメント] iOS 8.0 Release Notes
・[Appleドキュメント] iOS 7.1 Release Notes
・[Appleドキュメント] iOS 7.0 Release Notes
・[Appleドキュメント] iOS 6.1 Release Notes
・[Appleドキュメント] iOS 6.0 Release Notes
・[Appleドキュメント] iOS 5 Release Notes

 


Comments are closed.