我试图在我的variables.less文件中添加一些变量,这些变量允许我覆盖Bootstrap提供的navbar-inverse样式。我有一个普通的导航栏样式,但我无法得到反向工作。
这是我的导航栏样式:
@navbar-inverse-color: @brand-primary;
@navbar-inverse-bg: @white;
@navbar-inverse-border: @white;
所以我按照这个例子尝试用这样的方式设置反转:
@IBAction func getSQLDB (sender: NSButton) {
let documentsFolder = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0] as String
let path = documentsFolder.stringByAppendingPathComponent("kjv.db")
println(documentsFolder)
let database = FMDatabase(path: path)
if !database.open() {
println("Unable to open database")
return
}
//if let rs = database.executeQuery("SELECT * FROM bible WHERE (book = 'Gen') AND (chapter = '1')", withArgumentsInArray: nil) {
if let rs = database.executeQuery("SELECT * FROM bible WHERE (book = 'Genesis') OR (book = 'Exodus')", withArgumentsInArray: nil) {
while rs.next() {
let content = rs.stringForColumn("content")
let verseNumber: Int! = rs.stringForColumn("verse").toInt()
let chapter: Int! = rs.stringForColumn("chapter").toInt()
let name = rs.stringForColumn("book")
// Loops through all the information from the query and creates a book
makeBook(name, content: content, chapter: chapter, verseNumber: verseNumber)
}
} else {
println("select failed: \(database.lastErrorMessage())")
}
database.close()
}
但它不起作用。有什么理由吗?
答案 0 :(得分:1)
反向导航栏的样式还有一些变量,但你正在做的事情应该可以正常工作。
如果您没有看到预期的结果,我会检查以下内容:
这是我想到的第一件事。如果这仍然无法解决您的问题,请告诉我,我会更深入地思考; - )