ℹ️ This article is also available on his blog.
Layout and Drawing are two different things:
- Layout defines only the positions and sizes of all views on screen.
- Drawing specifies how each view is rendered (how it looks).
ℹ️ This article is also available on his blog.
Layout and Drawing are two different things:
~/Users/<USER>/Library/Developer/CoreSimulator/Devices/<DEVICE_ID>/data/Containers/Data/Application/<APP_ID>/Library/Preferences/<APP_BUNDLE_ID>.plist
- = MAC user name
- <DEVICE_ID> = Device/Simulator Identifier, e.g., 999271B8-FAA6-41DE-9864-4111F422ED12
- <APP_ID> = Application identifier, e.g., 69928AEF-BCD5-413A-B06F-BC4A07080D62
- <APP_BUNDLE_ID> = Your apps bundle identifier, e.g., com.company.appname.plist
// | |
// TrimmingExample.swift | |
// | |
// Created by Vasilis Akoinoglou on 13/5/24. | |
// | |
import SwiftUI | |
struct Line: Identifiable { | |
let id = UUID() |
struct ContentView: View { | |
private let imageUrl: String = "https://picsum.photos/seed/picsum/200/300" | |
var body: some View { | |
text | |
.overlay( | |
AsyncImage(url: .init(string: imageUrl)) { image in | |
image | |
.resizable() | |
.aspectRatio(contentMode: .fill) |
import Darwin | |
let handle = dlopen("/usr/lib/libc.dylib", RTLD_NOW) | |
let sym = dlsym(handle, "random") | |
let functionPointer = UnsafeMutablePointer<() -> CLong>(sym) | |
let result = functionPointer.memory() | |
println(result) |
Here, I will save basic coredata information for anyone/me would like a quick refresh for these fundamentals from time to time.
NSManagedObject
and NSManagedObjectContext
in Core Data are not thread-safe.NSManagedObject
instances and NSManagedObjectContext
instances in a serial queue.# Created by https://www.toptal.com/developers/gitignore/api/xcode,swift,macos | |
# Edit at https://www.toptal.com/developers/gitignore?templates=xcode,swift,macos | |
### macOS ### | |
# General | |
.DS_Store | |
.AppleDouble | |
.LSOverride | |
# Icon must end with two \r |
Tell your Mac what to do, declaratively
It is the declarative Layer for RobotKit. It provides several tasks of type RobotTask
that helps client define their required tasks in declarative way.
final class UnitsViewModel { | |
// MARK: - Public Members/Methods | |
let onLoadingMoreUnits = PassthroughSubject<Bool, Never>() | |
let onInitialResult = PassthroughSubject<[UnitDto], Never>() | |
let onError = PassthroughSubject<HighLevelError.Reason, Never>() | |
var moreUnitsToLoad: Bool { | |
unitsQueue.isNotEmpty |
final class DetailFlagImageView: RatioConstrainedImageView { | |
//MARK: - Init Methods | |
override init(frame: CGRect) { | |
super.init(frame: frame) | |
initView() | |
} | |