問題タブ [custom-transition]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
ios - AnimationController で Core Animation を使用すると、iOS UINavigationController カスタム InteractionController が正しく機能しない
NavigationController のトランジションに使用するカスタム アニメーション コントローラーがあり、それをインタラクティブにしたいので、カスタム インタラクション コントローラーを作成しました。一部のコントローラーでは正常に動作しますが、CoreAnimations を使用してアニメーションを実行するコントローラーでは正常に動作します。正しく動作しません。
アニメーションを自動的に開始および終了します。Interaction Controllerfinish()
が呼び出されなかったため、黒い画面が残ります。
AnimationController のコードは次のとおりです。
私の CAAnimationDelegate では:
最後に、InteractionController は次のとおりです。
私は何を間違っていますか?
ios - プッシュ アニメーションと同期した UINavigationBar のカラー アニメーション
UINavigationBar
背景色が異なるビュー間でスムーズなアニメーションを実現したいと考えています。埋め込みビューの背景色は同じで、次のUINavigationBar
ようなプッシュ/ポップ遷移アニメーションを模倣したい:
カスタムトランジションを用意しました:
UINavigationControllerDelegate
メソッドの実装でそれを返しました:
プッシュ アニメーションはかなりうまく機能しますが、ポップは機能しません。
質問:
- ポップ アニメーションの前に NavBar の色をクリアした後、黄色のままになるのはなぜですか?
- 私の目標を達成するためのより良い方法はありますか?(ナビゲーションバーはフローの一部にすぎないため、常に透明にすることはできません)
これは、GitHub の私のテスト プロジェクトへのリンクです。
編集
これは、議論された問題と望ましい効果の全体像を示す gif です。
ios - Inconsistent keyboard notifications when presenting a view controller
I have a view controller A
which is currently in editing mode, i.e. it has a text field that is currently the first responder.
Now I present view controller B
from A
with a custom animator:
For reasons of simplicity, this animator doesn't animate much: It only adds the destination view controller's view to the hierarchy and that's it.
View controller B
has a text field as well and when it appears on screen, I want it to become the first responder immediately. Thus I added this code to view controller B
:
Now the interesting part is what happens between
and
1. Inside Rootview
When the text field in view controller A
is placed anywhere inside its root view, these are the keyboard notifications I receive from NotificationCenter
:
In other words: Adding the destination view controller's view to the transition's container view causes all these keyboard notifications to be fired. This is great because afterwards I can update B
's layout to account for the keyboard and also apply these layout changes to my transition animation.
2. Inside collection view cell
When the text field is placed inside a collection view cell of view controller A
, however, no keyboard notifications are received during the transition:
In any case, these are the notifications I receive before the transition animation begins:
This is problematic as in the second scenario view controller B
still "thinks" that the keyboard is hidden during the animation. Thus, I cannot layout its view and create the correct animations.
Any idea why the keyboard notifications aren't fired in scenario 2 and how I can fix that?
ios - ナビゲーション コントローラーを介したカスタム アニメーションでの遷移後の SecondViewController の非アクティブ ビュー
2 つのビュー コントローラー (ViewController と SecondViewController) と 1 つのナビゲーション コントローラーがあります。
ViewController から SecondViewController へのカスタム遷移アニメーションを使用する私のプロジェクト:
ViewController (ドアの画像) では、遅延を使用して遷移アニメーションを開始し、SecondViewController (緑色の背景) に移動します。
SecondViewController にはボタンを押す機能があります:
アニメーションは正しく動作しますが、SecondViewController (緑の背景) はボタンを押しても反応しません。SecondViewController のコード
true を返します。コードのどこに問題がありますか? ボタンを押して作業したい。