Post

Replies

Boosts

Views

Activity

Reply to [iOS 18] UITabBarController disable new switching animation
final class TabBarController: UITabBarController { override func viewDidLoad() { super.viewDidLoad() if #available(iOS 18.0, *) { delegate = self } } } extension TabBarController: UITabBarControllerDelegate { func tabBarController(_ tabBarController: UITabBarController, animationControllerForTransitionFrom fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? { return self } } extension TabBarController: UIViewControllerAnimatedTransitioning { func transitionDuration(using transitionContext: (any UIViewControllerContextTransitioning)?) -> TimeInterval { return .zero } func animateTransition(using transitionContext: any UIViewControllerContextTransitioning) { guard let view = transitionContext.view(forKey: .to) else { return } let container = transitionContext.containerView container.addSubview(view) transitionContext.completeTransition(true) } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’24
Reply to How to add view below navigation bar to extend scroll edge effect
[quote='867583022, Jordan, /thread/808436?answerId=867583022#867583022, /profile/Jordan'] That does work thanks! Adding that to the container view of the segmented control seamlessly blends the scroll edge effect across both the navigation bar and custom "bar." [/quote] Hello! In my case, everything works but not as expected. The edge effect only applies around segmentedControl and looks like a shadow. However, if I hide navigationBar, effect extends to the entire width. Could you help me figure out what I'm doing wrong and how to implement this behavior correctly? Thank you!
Topic: UI Frameworks SubTopic: UIKit Tags:
9h