🐱 にゃーん
Context:
| #!/usr/bin/env bash | |
| set -e | |
| VOLUME_PATH=/Volumes/installer | |
| while getopts ":d:h" opts; do | |
| case $opts in | |
| d) | |
| VOLUME_PATH=$OPTARG | |
| ;; |
🐱 にゃーん
Context:
| let textView = UITextView(frame: view.bounds) | |
| textView.autoresizingMask = [.flexibleWidth, .flexibleHeight] | |
| let text = NSMutableAttributedString(string: "test") | |
| text.addAttributes([ | |
| .font: UIFont.systemFont(ofSize: 20.0), | |
| .foregroundColor: UIColor.label, | |
| .underlineStyle: 0 | |
| ], range: NSRange(location: 0, length: text.length)) |
| extension String { | |
| /// Finds matching groups and replace them with a template using an intuitive API. | |
| /// | |
| /// This example will go through an input string and replace all occurrences of "MyGreatBrand" with "**MyGreatBrand**". | |
| /// | |
| /// let regex = try! NSRegularExpression(pattern: #"(MyGreatBrand)"#) // Matches all occurrences of MyGreatBrand | |
| /// someMarkdownDocument.replaceGroups(matching: regex, with: #"**$1**"#) // Surround all matches with **, formatting as bold text in markdown. | |
| /// print(someMarkdownDocument) | |
| /// | |
| /// - Parameters: |
| @objc protocol ExampleActions: AnyObject { | |
| func pushUIKitViewController() | |
| } | |
| struct ExampleView: View { | |
| @FirstResponder private var firstResponder | |
| var body: some View { | |
| Button { | |
| firstResponder.sendAction(#selector(ExampleActions.pushUIKitViewController)) |
| ** 概要 | |
| applelocalization-toolsでシステムの言語ファイルを読み取り、applelocalization-dataのデータを作る。 | |
| 追加したデータを表示できるようにWebフロントエンド(エンドポイントやドロップダウンメニューを追加する)を修正する。 | |
| *** 手順 1〜11 | |
| - github.com/kishikawakatsumi/applelocalization-tools | |
| - システムに含まれる言語ファイルを読み取りDBの1レコード単位に整形したJSONファイルを作る | |
| - JSONファイルからDBにインポートできるデータを作る。 |
| import AppKit | |
| import SwiftUI | |
| public struct TextView: NSViewRepresentable { | |
| @Binding | |
| var text: String | |
| var font: NSFont? | |
| public init( | |
| text: Binding<String> |