UINavigationItem+Margin 2.1.1

UINavigationItem+Margin 2.1.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Oct 2017

Maintained by Suyeol Jeon.


Downloads

Total55,658
Week0
Month0

Installs

Apps409
Test Targets38
powered by Segment

GitHub

Stars91
Watchers1
Forks11
Issues1
Contributors1
Pull Requests0

Code

Files8
LOCLines of Code 278


  • By
  • Suyeol Jeon


Margin for UINavigationItem.

Setting Margins

Just set leftMargin and rightMargin of your UINavigationItem.

navigationItem.leftMargin = 0;
navigationItem.rightMargin = 0;

zero

Wow, margin has disappeared.

Even you can do this:

navigationItem.leftMargin = 50;
navigationItem.rightMargin = 20;

ugly

Looks ugly but works.

System Margins

Want to restore margins? Use [UINavigationItem systemMargin].

navigationItem.leftMargin = [UINavigationItem systemMargin]; // 16 on iOS 7+
navigationItem.rightMargin = [UINavigationItem systemMargin];

system

Installation

I recommend you to use CocoaPods.

Podfile

pod 'UINavigationItem+Margin'

License

UINavigationItem+Margin is under MIT license. See the LICENSE file for more info.