I have a navigationController set and whenever I push a new ViewController using
navigationController?.pushViewController(registrationViewController, animated: true)
The CPU usage of the app goes up to 100% for no reason.
I used Time Profiler to know better what was causing this CPU overuse, and I found out that the process _CFRunLoopRun is taking a lot of CPU capacity.
To be honest I don't know what could cause the problem since the presentation of the view controller and the viewcontroller itself it's really easy.
let registrationViewController = tryVC2()
navigationController?.pushViewController(registrationViewController, animated: true)
I also noticed that this only happens when I use pushViewController method, and not when I use presentViewController.
I would really appreciate If you could point me in the right direction in order to solve this problem.
EDIT: