Skip to content

Instantly share code, notes, and snippets.

View TachibanaKaoru's full-sized avatar
🏠
Working from home

Tachibana Kaoru TachibanaKaoru

🏠
Working from home
View GitHub Profile
import Foundation
import UIKit
struct WeatherInfo{
let title: String
let subTitle: String
let iconName: String
let description: String
}
@TachibanaKaoru
TachibanaKaoru / gist:205aaa11817e566ba39104cd78f952fd
Created February 16, 2022 11:57
Custom UIContentConfiguration
import UIKit
struct WeatherInfo{
let title: String
let subTitle: String
let iconName: String
let description: String
}
class ViewController: UIViewController {
import UIKit
struct WeatherInfo{
let title: String
let subTitle: String
let iconName: String
let description: String
}
class ViewController: UIViewController {
@TachibanaKaoru
TachibanaKaoru / gist:a6dea8f1a221ba9d68e3098b0df2b10e
Created February 16, 2022 04:18
UICollectionViewListCell defaultContentConfiguration
import UIKit
struct WeatherInfo{
let title: String
let subTitle: String
let iconName: String
let description: String
}
class ViewController: UIViewController {
import ARKit
import PlaygroundSupport
var arView = ARSCNView(frame: CGRect(x: 0, y: 0, width: 300, height: 300))
arView.autoenablesDefaultLighting = true
let scene = SCNScene()
arView.scene = scene
let configuration = ARWorldTrackingConfiguration()
import SceneKit
import PlaygroundSupport
// 表示用のSCNViewを作る。
var sceneView = SCNView(frame: CGRect(x: 0, y: 0, width: 300, height: 300))
var scene = SCNScene()
sceneView.scene = scene
sceneView.autoenablesDefaultLighting = true
// PlaygroundPageに作ったSCNViewを設定。
@TachibanaKaoru
TachibanaKaoru / circularasyncdo.swift
Created December 11, 2018 21:35
ircular Reference async
let person1 = Person(name: "🐱")
let person2 = Person(name: "🦁")
let person3 = Person(name: "🐷")
let person4 = Person(name: "🐼")
let person5 = Person(name: "🐻")
person1.normalHello()
person2.strongHello()
person3.weakHello()
person4.noescapeHello()
@TachibanaKaoru
TachibanaKaoru / circularasync.swift
Created December 11, 2018 21:34
Circular Reference async
class Person{
var name: String
init(name: String) {
print("--- init \(name) ---")
self.name = name
}
deinit {
let person1 = Person(name: "🐱")
let person2 = Person(name: "🦁")
let person3 = Person(name: "🐷")
let person4 = Person(name: "🐼")
person1.normalHello()
person2.strongHello()
person3.weakHello()
person4.noescapeHello()
@TachibanaKaoru
TachibanaKaoru / circularnoescape.swift
Created December 11, 2018 21:20
Circular reference (noescape)
class Person{
var name: String
init(name: String) {
print("--- init \(name) ---")
self.name = name
}
deinit {