HeroTransitions / HeroTransitions/Hero

navigation transition is delayed by 0.5s

Open
#689 5 comments 4 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
22.5k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

## What did you do?

I'm pushing a new view controller with Hero, nothing special. Going from the Home module to Search by tapping on the search field; the search field should move to the top.

```
navigationController.hero.isEnabled = true
navigationController.heroNavigationAnimationType = .fade
navigationController.pushViewController(searchModuleVC, animated: true)
```

In my Home module, I have the following configuration:
```
searchTextField.hero.id = UIConstants.HeroIDs.searchTextFieldId
searchTextField.hero.modifiers = [.translate()]
```
And in the search module just this:
```
searchTextField.hero.id = UIConstants.HeroIDs.searchTextFieldId
```

## What did you expect to happen?

Well, the transition should happen.

## What happened instead?

... and it does, but with a noticeable delay of 0.5s. I logged everything on the console and this is how it looks like:
```
2020-12-09 12:01:47.261124+0100 delegate called (textFieldShouldBeginEditing)
2020-12-09 12:01:47.261862+0100 showSearch will call push
2020-12-09 12:01:47.262464+0100 showSearch did call push
2020-12-09 12:01:47.796420+0100 [API] dead reply from commit sync
```

Note the delay of 0.53s and the last line. Before the console shows this line, nothing happens. It seems that the transition animation starts precisely when this line is printed on the console. Unfortunately, a quick google search for this log message doesn't show anything. When I disable Hero transition, there is no delay and no `dead reply from commit sync` line in the logs (just an ordinary "push" animation).

## General Information

* Hero Version: 1.5.0

* iOS Version(s): 14.0, 14.2

* Swift Version: 5

* Devices/Simulators: iPhone 8 Plus (simulator), iPhone Xr iOS 14.0 (device)

* Reproducible in Examples? (Yes/No): Yes, every time.

## Demo Project

Unfortunately not allowed, maybe I'll create one from scratch later.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.