Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

231
Vistas
Increase the height of UINavigationBarLargeTitleView

I want to add a banner to the navigation bar, but by increasing the height of it. I want to copy the design and behaviour of an artist page in the Apple Music app:

Apple Music

It behaves just like a normal Large Title would, except for that it has been moved down, it has a sticky UIImageView behind it and it returns its background when the user scrolls down far enough. You can fire up Apple Music, search for an artist and go to their page to try it out yourself.

I've tried a bunch of things like setting the frame on the UINavigationBarLargeTitleView, and the code from this answer: https://stackoverflow.com/a/49326161/5544222

I already got a hold of the UINavigationBarLargeTitleView and its UILabel using the following code:

func setLargeTitleHeight() {
    if let largeTitleView = self.getLargeTitleView() {
        if let largeTitleLabel = self.getLargeTitleLabel(largeTitleView: largeTitleView) {
            // Set largeTitleView height.
        }
    }
}

func getLargeTitleView() -> UIView? {
    for subview in self.navigationBar.subviews {
        if NSStringFromClass(subview.classForCoder).contains("UINavigationBarLargeTitleView") {
            return subview
        }
    }
    return nil
}

func getLargeTitleLabel(largeTitleView: UIView) -> UILabel? {
    for subview in largeTitleView.subviews {
        if subview.isMember(of: UILabel.self) {
            return (subview as! UILabel)
        }
    }
    return nil
}
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Initially put a view with image and label and play button. Then clear the navigation bar it will show the image below it by

self.navigationController!.navigationBar.setBackgroundImage(UIImage(), for: .default)
    self.navigationController!.navigationBar.shadowImage = UIImage()
    self.navigationController!.navigationBar.isTranslucent = true

later when you scroll up you have to handle it manually and again show the navigation with title.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda