microsoft / microsoft/fluentui-apple
UIBarButtonItem with customView doesn't work with usesLargeTitle
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 977
- Forks
- 180
- Avg merge
- 21h 38m
- Merged PRs (30d)
- 1
Description
I am trying to use customView for rightNavigationItem along with "usesLargeTitle"
viewController.navigationItem.usesLargeTitle = true
var btn: UIBarButtonItem {
let button = UIButton(type: .custom)
button.setImage(UIImage(named: "Alert"), for: .normal)
button.frame = CGRect(x: 0, y: 0, 20, height: 20)
button.addTarget(self, action: #selector(handler), for: .touchUpInside)
return UIBarButtonItem(customView: button)
}
viewController.navigationItem.rightBarButtonItems = [btn]
So when this property is set, it hides the customView behind other blocked views. Any button set inside customView does not show in view stack.
Any suggestions?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report names the UIKit entry points navigationItem.usesLargeTitle, rightBarButtonItems, and UIBarButtonItem(customView:), but no repository file or test. Reproduce the sample first and trace the navigation bar layout behavior; done means the custom button is visible and usable alongside the large title.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100