ℹ️ 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:
| // | |
| // TrimmingExample.swift | |
| // | |
| // Created by Vasilis Akoinoglou on 13/5/24. | |
| // | |
| import SwiftUI | |
| struct Line: Identifiable { | |
| let id = UUID() |
| 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) |