Skip to content

Instantly share code, notes, and snippets.

View imthath-m's full-sized avatar
💭
developmentMode

Mohammed Imthathullah imthath-m

💭
developmentMode
View GitHub Profile
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)"
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
import Foundation
class Vehicle: Codable {
var seats: Int = 0
init() { }
func move() { }
}