问题描述
我有一个pdf应用程序 我想旋转pdf这是我的代码 但是我希望教科书注释不更改并保持在纵向模式下,该怎么办,因为每次旋转页面并开始添加教科书时,我的文本框都将以旋转模式添加!
这是我用于创建文本框的代码:
let linkAnn = PDFAnnotation.init(bounds: CGRect(x: 150,y: 350,width: 180,height: self.usingHeightText),forType: PDFAnnotationSubtype.widget,withProperties: nil)
linkAnn.widgetFieldType = .text
linkAnn.isMultiline = true
linkAnn.contents = "fileNumber\(self.pdfClickedRow)PageNumber\(getPagenumber)addtext\(self.AddTextCount)" //"\(AddTextCount)"
linkAnn.widgetStringValue = NSLocalizedString("placeholder",comment: "")
linkAnn.font = UIFont(name: self.usingFontName,size: CGFloat(self.usingFontSize))
linkAnn.fontColor = self.usingFontColor
linkAnn.backgroundColor = self.usingBGFontColor.withAlphaComponent(self.usingBGFontAlpha)
linkAnn.setValue("addtext\(self.AddTextCount)",forAnnotationKey: PDFAnnotationKey.name)
let index = self.pdfDocument?.index(for: self.pdfView.currentPage!)
self.pdfView.document?.page(at: index!)?.addAnnotation(linkAnn)
这是我的代码rotate:
self.pdfView.currentPage?.rotation += 90
self.pdfView.annotationsChanged(on: pdfView.currentPage!)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)