I'm trying to think of ways I could use machine learning to enhance my apps. Feedback wanted!
You can find my apps here.
- Natural language processing to parse a new event title, like Fantastical.
| import Photos | |
| struct UnexpectedNilError: Error {} | |
| extension PHImageManager { | |
| func requestImage( | |
| for asset: PHAsset, | |
| targetSize: CGSize, | |
| contentMode: PHImageContentMode, | |
| options: PHImageRequestOptions? |
| /** | |
| Before: | |
| ``` | |
| .clipShape(Rectangle()) | |
| ``` | |
| After: | |
| ``` |
| extension UIImage { | |
| private final class UIImageActivityItemSource: NSObject, UIActivityItemSource { | |
| var image = UIImage() | |
| var title: String? | |
| var url: URL? | |
| func activityViewControllerPlaceholderItem(_ activityViewController: UIActivityViewController) -> Any { | |
| UIImage() | |
| } |
I'm trying to think of ways I could use machine learning to enhance my apps. Feedback wanted!
You can find my apps here.
| /** | |
| Make a type `Identifiable` based on its `Hashable` hash value. | |
| This can be useful when all the properties are required to represent its identifier. | |
| ``` | |
| struct Item: Hashable, IdentifiableByHashable { | |
| let title: String | |
| var message: String? | |
| } |
| extension Image { | |
| /** | |
| ``` | |
| Image(nsImageNamed: NSImage.addTemplateName) | |
| ``` | |
| - Note: The `size` parameter is there as resizing in SwiftUI creates a blurry image. Seems like a bug: | |
| ``` | |
| Image(nsImageNamed: NSImage.addTemplateName) |
The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.
This means you have the following choices:
import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.await import(…) from CommonJS instead of require(…).Some developers you should support:
| import Combine | |
| import SwiftUI | |
| @available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *) | |
| @propertyWrapper | |
| public struct Model<Value>: DynamicProperty { | |
| private final class _Box: ObservableObject { | |
| let objectWillChange = ObservableObjectPublisher() | |
| var value: Value { |