I want to have a square button on my toolbar. Mine UIBarButtonItemuses an image wide enough to push my button into a rectangular shape. I looked through the docs but couldn't find the best size to use.
Looking at the other answers, 29.0it seems to be the overall size, but I would like confirmation. This is how I set my button up:
UIBarButtonItem *locationButtonItem = [[UIBarButtonItem alloc]
initWithImage:[UIImage imageNamed:@"location.png"]
style:UIBarButtonItemStyleBordered
target:self
action:@selector(locationButtonTapped:)];
[locationButtonItem setWidth:29.0f];
What width should I set so that my toolbar button makes it square?
source
share