Want to give additional space from the top for navigation title shopping list. How can I do it? Dont see a option to do it in the properties of navigation item in the story board. Its close to the date, battery icon in the top of the app.
Attached the screenshot.
Tried the below code its not working using swift2
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
navigationController?.navigationBar.setTitleVerticalPositionAdjustment(15,forBarMetrics: UIBarMetrics.Default) // set any number you want between -20 to 15
}
Try this code: Tested in Swift 3.
Note: Method 1 works only, If your VC embedded with navigationController.In your case you only using navigationBar to show title.So, use method 2.
Method 1:
Method 2:
Output: