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 SwiftUI | |
| /** | |
| This view demonstrates that scroll anchors are IGNORED when using `.scrollPosition(...).scrollTo(id:anchor:)`. | |
| - Using `.scrollViewProxy.scrollTo(id:anchor:)` works correctly, anchors are respected. | |
| - Using `.scrollPosition.scrollTo(id:anchor:)` ignores the anchor, always positions the target at the same place. | |
| Use this as a proof-of-bug or platform inconsistency. | |
| */ | |
| struct ContentView: View { |
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
| public enum FrameDimension { | |
| case width, height | |
| } | |
| extension View { | |
| public func frame(infinity dimensions: FrameDimension...) -> some View { | |
| var maxWidth: CGFloat? | |
| var maxHeight: CGFloat? | |
| for dimension in dimensions { |
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
| // | |
| // LivePhotoCompressible.swift | |
| // Swop | |
| // | |
| // Created by Bryan on 5/18/16. | |
| // Copyright © 2016 Swop. All rights reserved. | |
| // | |
| import Foundation | |
| import UIKit |