Post

Replies

Boosts

Views

Activity

adaptivePresentationStyle method was called many times
Hi, When I rotated iPhone from portrait to landscape , the adaptivePresentationStyle method was called 6 times , printed compact 2 times and regular .4 times // presenting viewcontroller let vc2 = VC2() vc2.modalPresentationStyle = .custom vc2.transitioningDelegate = self present(vc2, animated: true, completion: nil) // PresentationControllerDelegate func adaptivePresentationStyle(for controller: UIPresentationController, traitCollection: UITraitCollection) -> UIModalPresentationStyle {                  if traitCollection.verticalSizeClass == UIUserInterfaceSizeClass.compact {             print("compact")             return .fullScreen         }         print("regular")         return .none } Why it printed regular 4 times in landscape mode ? Thanks!
Topic: UI Frameworks SubTopic: UIKit Tags:
0
0
292
Nov ’21
NavigationBar does not display back button and title
Hi, I use navigationController to push a view controller , by customizing a UINavigationControllerDelegate method which returns a AnimatedTransitioning . This works well . If I use a gesture , customizing another delegate method which return a InteractiveTransitioning , the view controller and navigationBar are both displayed , but back button and title aren't , although they're really displayed in the debug view hierarchy . Thanks
Topic: UI Frameworks SubTopic: UIKit Tags:
2
0
429
Nov ’21
adaptivePresentationStyle method was called many times
Hi, When I rotated iPhone from portrait to landscape , the adaptivePresentationStyle method was called 6 times , printed compact 2 times and regular .4 times // presenting viewcontroller let vc2 = VC2() vc2.modalPresentationStyle = .custom vc2.transitioningDelegate = self present(vc2, animated: true, completion: nil) // PresentationControllerDelegate func adaptivePresentationStyle(for controller: UIPresentationController, traitCollection: UITraitCollection) -> UIModalPresentationStyle {                  if traitCollection.verticalSizeClass == UIUserInterfaceSizeClass.compact {             print("compact")             return .fullScreen         }         print("regular")         return .none } Why it printed regular 4 times in landscape mode ? Thanks!
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
0
Boosts
0
Views
292
Activity
Nov ’21
NavigationBar does not display back button and title
Hi, I use navigationController to push a view controller , by customizing a UINavigationControllerDelegate method which returns a AnimatedTransitioning . This works well . If I use a gesture , customizing another delegate method which return a InteractiveTransitioning , the view controller and navigationBar are both displayed , but back button and title aren't , although they're really displayed in the debug view hierarchy . Thanks
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
2
Boosts
0
Views
429
Activity
Nov ’21