قالب وردپرس درنا توس
Home / IOS Development / ios – Increase the height of the UINavigationBarLargeTitleView

ios – Increase the height of the UINavigationBarLargeTitleView



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

  Apple Music

It behaves just like a normal big title would, except it's moved down, it has a sticky UIImageView is behind it and it returns the background when the user scrolls far enough down. You can shoot Apple Music, search for an artist and go to their site to try it out for yourself.

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

61/5544222ebrit19659004achte. I have already obtained the UINavigationBarLargeTitleView and its UILabel using the following code: [19659006] func setLargeTitleHeight () {
if let largeTitleView = self.getLargeTitleView () {
if let largeTitleLabel = self.getLargeTitleLabel (largeTitleView: largeTitleView) {
// Set largeTitleView height.
}
}
}

func getLargeTitleView () -> UIView? {
for teaching self.navigationBar.subviews {
If NSStringFromClass (subview.classForCoder) .concepts ("UINavigationBarLargeTitleView") {
return subview
}
}
back zero
}

func getLargeTitleLabel (largeTitleView: UIView) -> UILabel? {
for teaching largeTitleView.subviews {
if subview.isMember (by: UILabel.self) {
return (teaching as! UILabel)
}
}
back zero
}


Source link