Skip to content
New issue

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

No highlighted touch-state for MMDrawerButtonItem in iOS7 #117

Closed
TomSwift opened this issue Sep 24, 2013 · 3 comments
Closed

No highlighted touch-state for MMDrawerButtonItem in iOS7 #117

TomSwift opened this issue Sep 24, 2013 · 3 comments

Comments

@TomSwift
Copy link
Contributor

In iOS6 the MMDrawerButtonItem highlights nicely when pressed. On iOS7 this isn't working for me. I tested in the iOS7 simulator using the KitchenSink app, via XCode5 GM.

"Native" UIBarButtonItems in iOS7 do have a highlight state.

I'm unclear why the MMDrawerButtonItem needs to have a custom-view (UIButton). Why can't it just have an image, which I believe would highlight correctly in all cases - iOS6 or iOS7? The image could still be rendered in code. I think the correct way to do this in iOS7 might be to use the iOS7 UIImage imageWithRenderingMode: UIImageRenderingModeAlwaysTemplate functionality. ??? Or maybe that's inherent in a UIBarButtonItem with an image.

EDIT the rationale for the UIButton in a customView is likely that this is the only way to get a borderless button in a navbar in iOS6.

The other thing I don't really care for with the UIButton/CustomView design is the small detail that the touch-up-inside action sender is the UIButton itself, not the UIBarButtonItem. Not a huge deal but inconsistent with UIBarButtonItem. An improvement might be to have the UIButton invoke a selector on the UIBarButtonItem, which would then forward the call to the defined target/selector, passing itself as the sender.

@kcharwood
Copy link
Contributor

I like the idea of having an "asset-less" bundle, but not having a highlighted touch state is a problem. I'd happily take in a pull request that addresses this.

@TomSwift
Copy link
Contributor Author

You got it.. Pull request made.

@kcharwood
Copy link
Contributor

Taking discussion to #119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants