ObjecTips

Swift & Objective-C で iOS とか macOS とか

2019-10-01から1ヶ月間の記事一覧

複数の AVSpeechSynthesizer の同時再生 iOS 13

最近 iOS 13 でバグも含め挙動が変わった点で色々と苦労している。そんな中良い改善点もあった。タイトルの複数の AVSpeechSynthesizer の同時再生がその1つ。 これまでは AVSpeechSynthesizer の同時再生はできなかった。できないと一口に言っても妙な挙動…

iOS 13 で AVSpeechSynthesisVoice.currentLanguageCode() の挙動が変更に(多分バグ)

Xcode 11, iOS 12.2, iOS 13.1, iOS 13.1.3 で動作確認 デフォルトの読み上げ音声の言語の確認 AVSpeechSynthesisVoice.currentLanguageCode() 参考に読み上げ確認の実装 (AVSpeechSynthesisVoice を設定せずデフォルト状態での読み上げ) let synthesize =…

iOS 13 で EventKitUI に追加された UIFont のカテゴリメソッド(多分Private用)

タイトルの通り iOS 13 で EventKitUI に UIFont のカテゴリメソッドが追加された。 @property(nonatomic, readonly, class) UIFont *ek_defaultOccurrenceSecondaryTextFont; + (UIFont *)ek_defaultOccurrencePrimaryTextFontForSizeClass:(UIUserInterfac…

prepareForSegue での segue の identifier による分岐を Swift enum で管理する

まず初めに以下の様なString型の enum を用意する。 enum SegueIdentifier: String { case a case b } Swift 5 以前 UIViewController の prepareForSegue メソッド内で segue.identifier から enum SegueIdentifier の作成を行う。 segue.identifier の型は…

iOS 13 で UIView の beginAnimations 等のアニメーション関連のメソッドが deprecated

タイトルの通り、iOS 13 で以下のメソッドが depecated になった。 UIView - UIKit | Apple Developer Documentation Animating Views class func beginAnimations(String?, context: UnsafeMutableRawPointer?) class func commitAnimations() class func s…