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
Language | Name | Quality | Identifier | Class | |
---|---|---|---|---|---|
ar-SA | Maged | Default | com.apple.ttsbundle.Maged-compact | AVSpeechSynthesisVoice | |
cs-CZ | Zuzana | Default | com.apple.ttsbundle.Zuzana-compact | AVSpeechSynthesisVoice | |
da-DK | Sara | Default | com.apple.ttsbundle.Sara-compact | AVSpeechSynthesisVoice | |
de-DE | Anna | Default | com.apple.ttsbundle.Anna-compact | AVSpeechSynthesisVoice | |
de-DE | Helena | Default | com.apple.ttsbundle.siri_female_de-DE_compact | AVSpeechSynthesisVoice | |
de-DE | Martin | Default | com.apple.ttsbundle.siri_male_de-DE_compact | AVSpeechSynthesisVoice | |
el-GR | Melina | Default | com.apple.ttsbundle.Melina-compact | AVSpeechSynthesisVoice | |
en-AU | Catherine | Default | com.apple.ttsbundle.siri_female_en-AU_compact | AVSpeechSynthesisVoice | |
en-AU | Gordon | Default | com.apple.ttsbundle.siri_male_en-AU_compact | AVSpeechSynthesisVoice |
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
# launch application | |
tell application "TextEdit" to run |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>DVTConsoleDebuggerInputTextColor</key> | |
<string>0 0 0 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>Menlo-Bold - 11.0</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> | |
<string>0 0 0 1</string> |
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
NSMutableArray *mArray = [NSMutableArray array]; | |
// fetch all image assets | |
PHFetchOptions *fetchOptions = [[PHFetchOptions alloc] init]; | |
fetchOptions.predicate = [NSPredicate predicateWithFormat:@"mediaType == %d", PHAssetMediaTypeImage]; | |
PHFetchResult *result = [PHAsset fetchAssetsWithOptions:fetchOptions]; | |
[result enumerateObjectsUsingBlock:^(PHAsset * __nonnull asset, NSUInteger idx, BOOL * __nonnull stop) { | |
// filter with subtype for screenshot | |
if (asset.mediaSubtypes & PHAssetMediaSubtypePhotoScreenshot) { | |
[mArray addObject:asset]; |
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
tell application "Finder" to close windows |
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 CoreFoundation | |
/* NSURLSession.h | |
Copyright (c) 2013-2019, Apple Inc. All rights reserved. | |
*/ | |
/* | |
NSURLSession is a replacement API for NSURLConnection. It provides | |
options that affect the policy of, and various aspects of the |
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 <objc/runtime.h> | |
void PrintMethodList(Class cls) { | |
printf("// Method List of %s\n", class_getName(cls)); | |
unsigned int outCount; | |
Method *methodList = class_copyMethodList(cls, &outCount); | |
for (unsigned int i=0; i<outCount; i++) { | |
Method m = methodList[i]; | |
SEL sel = method_getName(m); | |
printf("%s\n", sel_getName(sel)); |
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
// UIWebView | |
{ | |
UIWebView *webView = [[UIWebView alloc] init]; | |
[webView loadHTMLString:@"<html></html>" baseURL:nil]; | |
NSString *appName = [webView stringByEvaluatingJavaScriptFromString:@"navigator.appName"]; | |
NSLog(@"%@", appName); | |
// Netscape | |
NSString *userAgent = [webView stringByEvaluatingJavaScriptFromString:@"navigator.userAgent"]; |
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
extension CKRecord { | |
subscript<Root, Value: CKRecordValueProtocol>(dynamicMember keyPath: WritableKeyPath<Root, Value>) -> Value? { | |
get { | |
let key = NSExpression(forKeyPath: keyPath).keyPath | |
return self[key] | |
} | |
set { | |
let key = NSExpression(forKeyPath: keyPath).keyPath | |
// Fatal error: Could not extract a String from KeyPath Swift.ReferenceWritableKeyPath | |
self[key] = newValue |
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
// | |
// TableViewCell.swift | |
// iOS12App | |
// | |
// Created by Kazuma Koze on 2020/03/05. | |
// Copyright © 2020 Climb App. All rights reserved. | |
// | |
import UIKit | |
import SwiftUI |
NewerOlder