Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I vertically align my status bar item text?

enter image description here

Left one on the picture is the date and time from Apple and one is my application one. As you may see the text of my application appears lower than the Apple one. Which doesn't look pretty. How can this be resolved?

self.statusBarItem.image                    = nil
self.statusBarItem.button?.imagePosition    = .NoImage
self.statusBarItem.button?.title            = "Sun 5 Jun  13:35"
like image 600
Mark Avatar asked Jun 05 '16 11:06

Mark


1 Answers

You could do it in offset. You cannot do it like this since it needs to be done on the status item button bar.

button.frame = CGRectMake(0.0, 0.5, button.frame.width, button.frame.height)
like image 190
Tarvo Mäesepp Avatar answered Nov 09 '22 22:11

Tarvo Mäesepp