UIBarButtonItem normal and pressed states switched?
I created a toolbar with a translucent black style like so:
UIToolbar *too开发者_JS百科lbar = [UIToolbar new];
toolbar.barStyle = UIBarStyleBlack;
toolbar.translucent = YES;
I created a button item for it:
UIBarButtonItem *buttonItem = [[UIBarButtonItem alloc] initWithImage:nil
style:UIBarButtonItemStyleBordered
target:self
action:@selector(mySelector:)];
I noticed that the button when in normal state appears light grey and turns to full black only when I press on it. This seems to be the opposite of how it should function (e.g. Photo app). I'd like it do be black in normal state and lighter when pressed. What am I missing?
Change the barstyle to UIBarStyleBlackTranslucent, as dumb as it sounds, and I believe it returns it to normal.
精彩评论