We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用自定义导航栏,修改导航栏宽度后,标题会跳动。使用以下代码自定义UINavigationBar,在demo中Main将导航栏修改成该类,可复现
class JGJNavigationBar: UINavigationBar { @objc var margins: CGFloat = 16 override func layoutSubviews() { super.layoutSubviews() if #available(iOS 13.0, *) { for view in subviews { if "\(view.self)".contains("UINavigationBarContentView") { let margins = view.layoutMargins self.margins = margins.left view.frame = CGRect(x: -margins.left, y: view.bounds.origin.y, width: view.bounds.size.width + margins.left + margins.right, height: view.bounds.size.height) break } } } else { for view in subviews { if "\(view.self)".contains("ContentView") { view.layoutMargins = UIEdgeInsets(top: view.layoutMargins.top, left: 0, bottom: view.layoutMargins.bottom, right: 0) self.margins = view.layoutMargins.left break } } } } }
The text was updated successfully, but these errors were encountered:
JXCategoryView不存在该问题
Sorry, something went wrong.
No branches or pull requests
使用自定义导航栏,修改导航栏宽度后,标题会跳动。使用以下代码自定义UINavigationBar,在demo中Main将导航栏修改成该类,可复现
The text was updated successfully, but these errors were encountered: