ios - How to put a Bar button item to the bottom of a toolbar? -


i have toolbar @ top of app. changed height programmatically make bit bigger.

    var consth = nslayoutconstraint(item: toolbar, attribute: nslayoutattribute.height,     relatedby: nslayoutrelation.equal, toitem: nil,      attribute: nslayoutattribute.notanattribute, multiplier: 1, constant: 64)     toolbar.addconstraint(consth) 

but have problem when add bar button items via storyboard, automatically centers them vertically. standard items stay @ bottom. how solve?

[please answer in swift]

enter image description here

you should hook bar button items using iboutlets, can add spacing using edge insets:

barbutton.imageinsets = uiedgeinsetsmake(0,10,0,0)


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -