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
Is it possible to use this with a UIBarButtonItem?
leftBarButtonItem could be hacked as it will always be on the top left of the view, but what abut a rightBarButtonItem?
The text was updated successfully, but these errors were encountered:
Hi @xcodewarrier There is not a best way to approach this as far as I know, just hacks that call the private view of the button: http://stackoverflow.com/questions/14318368/uibarbuttonitem-how-can-i-find-its-frame
view
Sorry, something went wrong.
+1
This would be a great feature to add a way to support this. It's a rather common use case.
try this:
private func frameForTabAtIndex(index: Int) -> CGRect { guard let tabBarSubviews = tabBarController?.tabBar.subviews else { return CGRect.zero } var allItems = [UIView]() for tabBarItem in tabBarSubviews { if tabBarItem.isKind(of: NSClassFromString("UITabBarButton")!) { allItems.append(tabBarItem) } } let item = allItems[index] return item.superview!.convert(item.frame, to: view) }
I have the same query as @xcodewarrier. Any update on it?
No branches or pull requests
Is it possible to use this with a UIBarButtonItem?
leftBarButtonItem could be hacked as it will always be on the top left of the view, but what abut a rightBarButtonItem?
The text was updated successfully, but these errors were encountered: