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

Total42,302
Week648
Month4,308

Installs

Apps251
Apps WeekApps This Week 37
Test Targets26
Test WeekTests This week 4
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.