-1

enter image description here

QLPreviewController navigationBar Title showing current page number like 2 of 6 but I want to change this title to any String like current file name.

Cristik
  • 30,989
  • 25
  • 91
  • 127
Naeem Hussain
  • 93
  • 1
  • 8

1 Answers1

1

Try this

        let lblNavTitle = UILabel(frame: CGRect(x: 60, y: 10, width: view.frame.size.width-110, height: 20))
        lblNavTitle?.textAlignment = .center
        lblNavTitle?.lineBreakMode = .byTruncatingMiddle
        lblNavTitle?.text = "File Name"
        navigationItem.titleView = lblNavTitle

OR

Simply set title property like

self.title = "File Name"

May be it will work for you

jignesh Vadadoriya
  • 3,244
  • 3
  • 18
  • 29