I'm new to Xcode and using Xcode 12 and storyboards and i'm trying to make a macOS app but i'm trying to to change the value of a progress bar,
any help?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I am using a Source List to display my data, here is my connection code @IBOutlet weak var listbox: NSOutlineView!, when inserting into it, it looks like nothing changed until you click the on the very top of the Source List then you select something,
here is my data source:
class MyDataSource: NSObject, NSOutlineViewDataSource {
var items: [[String: String]] = []
func outlineView(_ outlineView: NSOutlineView, numberOfChildrenOfItem item: Any?) -> Int {
return items.count
}
func outlineView(_ outlineView: NSOutlineView, child index: Int, ofItem item: Any?) -> Any {
return items[index]
}
func outlineView(_ outlineView: NSOutlineView, isItemExpandable item: Any) -> Bool {
return false
}
func outlineView(_ outlineView: NSOutlineView, viewFor tableColumn: NSTableColumn?, item: Any) -> NSView? {
let cell = outlineView.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: "MyCell"), owner: self) as! NSTableCellView
cell.textField?.stringValue = item as? String ?? "error"
return cell
}
}
I am using Xcode 10.1, Can anyone help?