- Keep responses as short, clear, and direct as possible.
- Focus on high-level details first; do not provide deep-dive architectures, diagrams, or code unless explicitly requested.
- Use the absolute minimum number of words necessary to answer the question.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UniformTypeIdentifiers | |
| import PhotosUI | |
| @available(iOS 14, *) | |
| extension PHPickerResult { | |
| var fileName: String? { | |
| guard let name = itemProvider.suggestedName else { return nil } | |
| if let extn = itemProvider.itemType?.preferredFilenameExtension { | |
| return name + ".\(extn)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| public extension UIView { | |
| @discardableResult func align(_ type1: NSLayoutConstraint.Attribute, | |
| with view: UIView? = nil, on type2: NSLayoutConstraint.Attribute? = nil, | |
| offset constant: CGFloat = 0, | |
| priority: Float? = nil) -> NSLayoutConstraint? { | |
| guard let view = view ?? superview else { | |
| return nil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| class Vehicle: Codable { | |
| var seats: Int = 0 | |
| init() { } | |
| func move() { } | |
| } |
OlderNewer