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 | |
struct Page<Item> { | |
typealias LoadMoreCompletion = (Result<[Item], Error>) -> Void | |
let items: [Item] | |
let loadMore: (@escaping LoadMoreCompletion) -> Void | |
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 SwiftUI | |
import PlaygroundSupport | |
struct ContentView: View { | |
@State private var isPresented = false | |
var body: some View { | |
ZStack { |
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 <Carbon/Carbon.h> | |
*/ | |
- (void)printInputSources { | |
CFArrayRef sourceList = TISCreateInputSourceList (NULL, true); | |
int sourceCount = CFArrayGetCount(sourceList); | |
for (int i = 0; i < sourceCount; i++) { |