UINavigationItem+Margin 2.1.0

UINavigationItem+Margin 2.1.0

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

Maintained by Suyeol Jeon.


Downloads

Total35,824
Week441
Month1,856

Installs

Apps219
Apps WeekApps This Week 29
Test Targets13
Test WeekTests This week 1
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.