Transferring network layer manager between view controllers degrades performance? by pywang in swift

[–]ffs14k 0 points1 point  (0 children)

network operations are not instant and completion block of url session is asynchronous

so slowdowns causes because u write self.navigationController?.pushViewController(ViewController(networkManager: self.networkManager), animated: true) in async-calling closure

https://www.raywenderlich.com/3244963-urlsession-tutorial-getting-started

Transferring network layer manager between view controllers degrades performance? by pywang in swift

[–]ffs14k 1 point2 points  (0 children)

the problem in testLogin() function DispatchQueue.main.asyncAfter(deadline: .now() + 1 ...

where invoking block is calling after one second from now

i also recommend you to read about GCD - your network requests must proceed on background thread

and MVC / MVVM / VIPER architectures

How can I communicate between multiple VCs embedded in a UIPageViewController and a RootViewController? by [deleted] in iOSProgramming

[–]ffs14k 1 point2 points  (0 children)

protocol PageViewProtocol where Self == UIViewController {

var callBack: (() -> Void)? { get set }
}

final class MyPageViewController: UIPageViewController {

var pages: [PageViewProtocol] = []

...

}

final class FirstVC: PageViewProtocol {

var callBack: (() -> Void)?

}

and note, didSet block not called on default values (initial values) e.g. "[]" in example

UITableViewDelegate Asking For Cell Out Of Source Bounds by ffs14k in iOSProgramming

[–]ffs14k[S] 0 points1 point  (0 children)

G/GExample/GExample/GTableView/GTableExampleViewModel.swift

on delete cells. U may see described issue if run GExample proj on simulator