Open masarapmabuhay opened 8 years ago
The code for the hints is located here: https://github.com/usbong/UsbongKit/blob/master/UsbongKit/Nodes/NodeView.swift#L79
There is no easy access to the API yet, but changing this property results in changing the color of the hints.
As for the words not having hints, this is related to #17.
For PagTsing iOS, I manually set the property to dark grey color:
nodeView.hintsColor = .darkGrayColor()
This is possible when creating a custom view controller, but this is proven to be too tedious, which is why I created the API to present a default view controller:
presentViewer(onViewController viewController: UIViewController, withUtreeURL url: NSURL, andData data: UsbongTreeData = UsbongTreeData()) {
Unfortunately, this leaves us with less customizability. I've thought of a solution to make this more customizable by having a data structure UsbongViewer
, where we can set any property we want to customize:
let usbongViewer = UsbongViewer(url: treeURL)
// Set properties
usbongViewer.bundles = [] // Pass in In-App Purchase bundles
usbongViewer.defaultBackgroundImage = myImage
usbongViewer.hintsColor = .darkGrayColor()
usbongViewer.present(on: self) // Present utree on top of current view controller
This proposal is found in issue #6.
Salut! I noticed that the font color of the words with hints makes the words themselves difficult to read. However, this is not the case in PagTsing (iOS). Therefore, the code in UsbongKit seems not yet updated.
1) UsbongKit
2) PagTsing
Merci beaucoup! p.s. incidentally, the .utree of PagTsing (iOS) is not updated as well, because not all words have their definitions.