Posts

Post not yet marked as solved
0 Replies
428 Views
According the WWDC23 presentation “What’s new in Core Data”, “Composite attributes may be nested within each other”. However, in the current macOS and iOS beta builds, only single level composite attributes (without nested composite attributes) are persisted in the SQLite database. Is this still work in progress? See example project in FB12552092.
Posted
by elemans.
Last updated
.
Post not yet marked as solved
0 Replies
2.4k Views
Since iOS 13, apps can make use of a new Fonts entitlement, with a sub option 'Use Installed Fonts' to use custom fonts installed by special font provider apps. These apps make use of the same entitlement, but with sub option 'Install Fonts'. Examples of such apps are CreativeCloud from Adobe and MyFonts from MonoType. Using installed fonts works fine, except with WKWebView. As an example, I use the following code to load some text in a WKWebView control, and use a UIFontPickerViewController to select a font. After selecting the font, both the font of the webView control and navigation bar are being updated. This works fine with built-in system fonts. But after selecting a custom installed font, only the font of the navigation bar is being updated. This indicates that the app supports the installed custom font, but not the WKWebView control. class ViewController: UIViewController { &#9;&#9;@IBOutlet weak var webView: WKWebView! &#9;&#9;var font = "Avenir Next" &#9;&#9;let html = """ &#9;&#9;<style> &#9;&#9;body { &#9;&#9;&#9;&#9;font-family: 'FONTFAMILY'; &#9;&#9;&#9;&#9;font-size: 40pt; &#9;&#9;} &#9;&#9;</style> &#9;&#9;<body> &#9;&#9;This is a test string to demonstrate the characters of a custom installed font named “<b>FONTFAMILY</b>”. Hopefully it will not be replaced by Times New Roman or some other ugly looking font. &#9;&#9;</body> &#9;&#9;""" &#9;&#9;override func viewDidLoad() { &#9;&#9;&#9;&#9;super.viewDidLoad() &#9;&#9;&#9;&#9;loadHTML() &#9;&#9;} &#9;&#9;@IBAction func selectFont(_ sender: AnyObject) { &#9;&#9;&#9;&#9;let picker = UIFontPickerViewController() &#9;&#9;&#9;&#9;picker.delegate = self &#9;&#9;&#9;&#9;present(picker, animated: true, completion: nil) &#9;&#9;} &#9;&#9;fileprivate func loadHTML() { &#9;&#9;&#9;&#9;webView.loadHTMLString(html.replacingOccurrences(of: "FONTFAMILY", with: font), baseURL: nil) &#9;&#9;&#9;&#9;navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.font : UIFont(name: font, size: 24)!] &#9;&#9;} } extension ViewController: UIFontPickerViewControllerDelegate { &#9;&#9;func fontPickerViewControllerDidPickFont(_ viewController: UIFontPickerViewController) { &#9;&#9;&#9;&#9;if let family = viewController.selectedFontDescriptor?.object(forKey: .family) as? String&#9;&#9;&#9;{ &#9;&#9;&#9;&#9;&#9;&#9;font = family &#9;&#9;&#9;&#9;&#9;&#9;loadHTML() &#9;&#9;&#9;&#9;} &#9;&#9;} } Question: what must I do get those custom installed fonts working in WKWebView? An older technique of installing custom fonts in iOS made use of configuration profiles. This works perfectly with WKWebView, but my question is about the new iOS 13 font installation technique, as explained here: https://developer.apple.com/videos/play/wwdc2019/227/
Posted
by elemans.
Last updated
.
Post not yet marked as solved
0 Replies
519 Views
The default width of NSSearchToolbarItem is way too large. I want it to be similar to the Notes app. Is there an official way to do this? Setting maxSize seems to work, until I saw all kinds of layout constraint errors in the console while customising the toolbar, so that's apparently not the way to go.
Posted
by elemans.
Last updated
.
Post marked as solved
2 Replies
1.2k Views
My app uses CloudKit Query subscriptions and notifications as part of a CloudKit-based synchronization solution. This works perfectly with iOS 12, macOS 10.14 and even macOS 10.15 beta, but NOT with iOS 13.0, iOS 13.1 and TVOS 13.0.Is this a known problem?According to the documentation, nothing has changed with CloudKit subscriptions. Or did I miss something?
Posted
by elemans.
Last updated
.