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
// | |
// HalfSheetWithUIKitForSwiftUI.swift | |
// TestAppForNewThinks | |
// | |
// Created by Hasan Ali Şişeci on 23.12.2023. | |
// | |
import SwiftUI | |
extension 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
extension Array { | |
func chunked(into size: Int) -> [[Element]] { | |
return stride(from: 0, to: count, by: size).map { | |
Array(self[$0 ..< Swift.min($0 + size, count)]) | |
} | |
} | |
} |