-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
Okay so use this example:
https://gist.github.com/N3ll/f6c939539b6c0e0ae0e5
So basically any time you change the content bound to the html property, the font assigned gets reset...so need to keep re-calling this. I mean the UIFont is still there but what's in the view is reset to Times, and you need to re-call the .ios.font on it.
var contentHtmlView = page.getViewById("contentHtmlView");
contentHtmlView.ios.font = UIFont.fontWithNameSize(fontName,fontSize);
When I change the property bound to viewModel
<HtmlView id="contentHtmlView" html="{{ Content }}" />
Video: http://www.screencast.com/t/0muA1wA5
Code in the click of the video is just this
exports.onChangeContent = function(args){
var contentHtmlView = page.getViewById("contentHtmlView");
viewModel.Content = "Changed: ios.font is " + contentHtmlView.ios.font;
}
by default on page load contentHtmlView.ios.font is null
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
felixkrautschuk, davidpronk, iecoding and xuhcc