UINavigationItem+Margin 2.0.2

UINavigationItem+Margin 2.0.2

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

Maintained by Suyeol Jeon.


Downloads

Total32,545
Week725
Month2,271

Installs

Apps196
Apps WeekApps This Week 29
Test Targets13
Test WeekTests This week 2
powered by Segment

GitHub

Stars91
Watchers1
Forks11
Issues0
Contributors1
Pull Requests0

Code

Files2
LOCLines of Code 163


  • 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.