Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Refactoring

Koze Koze

:octocat:
Refactoring
View GitHub Profile
@Koze
Koze / Normal.plist
Created Jul 14, 2021
/System/Library/PrivateFrameworks/ReminderKit.framework/Versions/A/Resources/CloudConfigurations/Normal.plist
View Normal.plist
<?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>configurationVersion</key>
<integer>2</integer>
<key>maxAttachmentsPerNote</key>
<integer>100</integer>
<key>maxInlineAssetSizeBytes</key>
<real>102400</real>
@Koze
Koze / otool reminders.tsv
Last active Jul 14, 2021
otool -L /System/Applications/Reminders.app/Contents/MacOS/Reminders
View otool reminders.tsv
macOS Big Sur 11.4(20F71)
otool -L /System/Applications/Reminders.app/Contents/MacOS/Reminders
/System/Applications/Reminders.app/Contents/MacOS/Reminders (architecture x86_64):
/System/Library/PrivateFrameworks/RemindersUICore.framework/Versions/A/RemindersUICore (compatibility version 1.0.0, current version 2285.0.0)
/System/Library/PrivateFrameworks/ReminderKitInternal.framework/Versions/A/ReminderKitInternal (compatibility version 1.0.0, current version 385.0.0)
/System/Library/PrivateFrameworks/CharacterPicker.framework/Versions/A/CharacterPicker (compatibility version 1.0.0, current version 184.3.0)
/System/Library/PrivateFrameworks/AOSAccounts.framework/Versions/A/AOSAccounts (compatibility version 1.0.0, current version 1.9.95)
/System/Library/PrivateFrameworks/AOSKit.framework/Versions/A/AOSKit (compatibility version 1.0.0, current version 282.0.0)
/System/Library/Frameworks/MapKit.framework/Versions/A/MapKit (compatibility version 1.0.0, current version 0.0.0)
/System/Library/PrivateFrame
@Koze
Koze / UIControlEventPrimaryActionTriggeredSample.swift
Created Jun 6, 2021
Implicitly using UIControlEventPrimaryActionTriggered
View UIControlEventPrimaryActionTriggeredSample.swift
let button = UIButton(frame: frame, primaryAction: action)
// implicitly
let button = UIButton(frame: frame)
button.addAction(action: action, for: .primaryActionTriggered)
@Koze
Koze / UnicodePrecomposedCharacterEquatable.swift
Last active Sep 17, 2020
The test for Equatable of precomposed characters of Unicode.
View UnicodePrecomposedCharacterEquatable.swift
func unicodeCodePointsToString(_ codePoints :[UInt32]) -> String {
let unicodeScalars = codePoints.compactMap { Unicode.Scalar($0) }
let characters = unicodeScalars.map { Character($0) }
let string = String(characters)
return string
}
// HIRAGANA LETTER GA
let ga = unicodeCodePointsToString([0x304C])
// HIRAGANA LETTER KA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK
@Koze
Koze / JapaneseFontProblem.swift
Last active May 9, 2020
Japanese font without Japanese character causes the clip at the bottom. The final workaround with extension.
View JapaneseFontProblem.swift
//
// SmapleView.swift
// JapaneseFontCropped
//
// Created by Kazuma Koze on 2020/05/08.
// Copyright © 2020 Climb App. All rights reserved.
//
/**
Copyright 2020 Kazuma Koze
@Koze
Koze / JapaneseFontProblem.swift
Last active May 8, 2020
Japanese font without Japanese character causes the clip at the bottom. The final workaround.
View JapaneseFontProblem.swift
import SwiftUI
struct SmapleView: View {
let ctFont = CTFontCreateWithName("HiraginoSans-W3" as CFString, 50, nil)
var ctFontDescender: CGFloat {
CTFontGetDescent(ctFont)
}
let borderColor = Color(.systemBlue)
@Koze
Koze / JapaneseFontProblem.swift
Created May 8, 2020
Japanese font without Japanese character causes the clip at the bottom. A refactored quick workaround.
View JapaneseFontProblem.swift
import SwiftUI
struct SmapleView: View {
let ctFont = CTFontCreateWithName("HiraginoSans-W3" as CFString, 50, nil)
var ctFontDescender: CGFloat {
CTFontGetDescent(ctFont)
}
let borderColor = Color(.systemBlue)
@Koze
Koze / JapaneseFontProblem.swift
Created May 8, 2020
Japanese font without Japanese character causes the clip at the bottom. A quick workaround.
View JapaneseFontProblem.swift
import SwiftUI
struct SmapleView: View {
let font = Font.custom("HiraginoSans-W3", size: 50)
let uiFont = UIFont(name: "HiraginoSans-W3", size: 50)!
let borderColor = Color(.systemBlue)
var body: some View {
HStack(spacing: 10) {
@Koze
Koze / JapaneseFontProblem.swift
Created May 8, 2020
Japanese font without Japanese character causes the clip at the bottom. A workaround that doesn't work.
View JapaneseFontProblem.swift
import SwiftUI
struct SmapleView: View {
let font = Font.custom("HiraginoSans-W3", size: 50)
let borderColor = Color(.systemBlue)
var body: some View {
HStack(spacing: 10) {
Text("Copy")
@Koze
Koze / JapaneseFontProblem.swift
Last active May 8, 2020
Japanese font without Japanese character causes the clip at the bottom.
View JapaneseFontProblem.swift
import SwiftUI
struct SmapleView: View {
let font = Font.custom("HiraginoSans-W3", size: 50)
let borderColor = Color(.systemBlue)
var body: some View {
VStack(spacing: 10) {
Text("Copy")