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

Total26,528
Week319
Month1,459

Installs

Apps171
Apps WeekApps This Week 27
Test Targets11
Test WeekTests This week 1
powered by Segment

GitHub

Stars88
Watchers0
Forks10
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.