問題タブ [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.

0 投票する
0 に答える
96 参照

ios - AnimationController で Core Animation を使用すると、iOS UINavigationController カスタム InteractionController が正しく機能しない

NavigationController のトランジションに使用するカスタム アニメーション コントローラーがあり、それをインタラクティブにしたいので、カスタム インタラクション コントローラーを作成しました。一部のコントローラーでは正常に動作しますが、CoreAnimations を使用してアニメーションを実行するコントローラーでは正常に動作します。正しく動作しません。

アニメーションを自動的に開始および終了します。Interaction Controllerfinish()が呼び出されなかったため、黒い画面が残ります。

AnimationController のコードは次のとおりです。

私の CAAnimationDelegate では:

最後に、InteractionController は次のとおりです。

私は何を間違っていますか?

0 投票する
3 に答える
2170 参照

ios - プッシュ アニメーションと同期した UINavigationBar のカラー アニメーション

UINavigationBar背景色が異なるビュー間でスムーズなアニメーションを実現したいと考えています。埋め込みビューの背景色は同じで、次のUINavigationBarようなプッシュ/ポップ遷移アニメーションを模倣したい:

ここに画像の説明を入力

カスタムトランジションを用意しました:

UINavigationControllerDelegateメソッドの実装でそれを返しました:

プッシュ アニメーションはかなりうまく機能しますが、ポップは機能しません。

ここに画像の説明を入力

質問:

  1. ポップ アニメーションの前に NavBar の色をクリアした後、黄色のままになるのはなぜですか?
  2. 私の目標を達成するためのより良い方法はありますか?(ナビゲーションバーはフローの一部にすぎないため、常に透明にすることはできません)

これは、GitHub の私のテスト プロジェクトへのリンクです。

編集

これは、議論された問題と望ましい効果の全体像を示す gif です。

ここに画像の説明を入力

0 投票する
0 に答える
84 参照

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.

Transition with visible keyboard

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?

0 投票する
1 に答える
143 参照

ios - UINavigationController でカスタム遷移アニメーターを定義するときの iMessage アプリのようなアンカー キーボード

Navigation Controller でカスタムのプッシュ/ポップ トランジションを作成しました。1 つの小さな事実を除いて、すべて問題ありません。キーボードをスワイプすると、ポップされたビュー コントローラーに固定されません。

何が起こっているのか、何が欲しいのかを示すための写真がいくつかあります。

ここに画像の説明を入力

これは、UInavigationControllerDelegate メソッドを使用して標準のアニメーターを置き換えた場合にのみ発生します。

0 投票する
2 に答える
99 参照

ios - ナビゲーション コントローラーを介したカスタム アニメーションでの遷移後の SecondViewController の非アクティブ ビュー

2 つのビュー コントローラー (ViewController と SecondViewController) と 1 つのナビゲーション コントローラーがあります。ここに画像の説明を入力

ViewController から SecondViewController へのカスタム遷移アニメーションを使用する私のプロジェクト:

ViewController (ドアの画像) では、遅延を使用して遷移アニメーションを開始し、SecondViewController (緑色の背景) に移動します。

SecondViewController にはボタンを押す機能があります:

アニメーションは正しく動作しますが、SecondViewController (緑の背景) はボタンを押しても反応しません。SecondViewController のコード

true を返します。コードのどこに問題がありますか? ボタンを押して作業したい。