我正在尝试从Bootstrap 4+构建可折叠的侧边栏。我已经从Bootstrap 3.3.7创建了一个代码,但是当我将其转换为Bootstrap 4+时,UI并不像在Bootstrap 3.3.7中显示的那样。我对HTML样式不太了解,并真诚地向这样做的人寻求帮助。
答案 0 :(得分:1)
要在Bootstrap 4中获得与在Bootstrap 3中相同的垂直边栏,只需将“ flex-column”类添加到带有“ nav”类的div中即可。
let pdf = renderer.pdfData { (context) in
let attributes = [ NSFontAttributeName : UIFont.boldSystemFont(ofSize: 15) ]
// page 1
context.beginPage()
NSAttributedString(string: "Page 1", attributes: attributes).draw(in: CGRect(x: 0, y: 0, width: 500, height: 200))
// page 2
context.beginPage()
NSAttributedString(string: "Page 2", attributes: attributes).draw(in: CGRect(x: 0, y: 0, width: 500, height: 200))
// page 3
context.beginPage()
NSAttributedString(string: "Page 3", attributes: attributes).draw(in: CGRect(x: 0, y: 0, width: 500, height: 200))
// Now that I know that the PDF will have 3 pages, add the footer on all 3 pages - but how?
}
}