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.
Asked
Active
Viewed 151 times
1 Answers
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