This file contains 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
let options = PHFetchOptions() | |
options.sortDescriptors = NSSortDescriptor(key:"creationDate" ascending:true) | |
let photosResult = PHAsset.fetchAssets(mediaType:.Image, options:options) | |
PHFetchOptions *allPhotosOptions = [PHFetchOptions new]; | |
allPhotosOptions.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"creationDate" ascending:YES]]; | |
PHFetchResult *allPhotosResult = [PHAsset fetchAssetsWithMediaType:PHAssetMediaTypeImage options:allPhotosOptions]; | |
[allPhotosResult enumerateObjectsUsingBlock:^(PHAsset *asset, NSUInteger idx, BOOL *stop) { |
This file contains 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 | |
import Combine | |
import SwiftUI | |
import UIKit | |
struct GridView: View { | |
@ObservedObject | |
var vm = GridViewModel() | |
let rows: Int = 25 |
This file contains 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
/* | |
Xcode 12.0 Beta 1 | |
Scrolling vertically freezes the App | |
*/ | |
struct VGridsExample: View { | |
private var data: [Int] { | |
(0 ... 2500).map {$0} | |
} | |
private var columns: [GridItem] { | |
Array(repeating: GridItem(.fixed(48),spacing: 0), count: 50) |
This file contains 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
/* | |
Tapping on top button will tap the buttons inside srollview!!! | |
Fix: Adding zOrder solved the problem | |
*/ | |
struct TapGoingBehind: View { | |
@State | |
var tapMeCount = 0 | |
@State | |
var rectangleTapCount = 0 |