※メモなのでタイプミスとか間違ってるとことかよくわからないところもある
v3.xの魅力 スライドは後日調整できたら公開
- C++11
- callbackをstd::functionに
@available(iOS 13.0, OSX 10.15, *) | |
struct Grid<Data, Content>: View where Data: RandomAccessCollection, Content: View, Data.Index == Int, Data.Element: Identifiable { | |
private let data: [GridData<Data>] | |
private let column: Int | |
private let content: (Data.Index, Data.Element) -> Content | |
init(_ data: Data, column: Int = 2, content: @escaping (Data.Index, Data.Element) -> Content) { | |
self.column = column | |
self.content = content |
import UIKit | |
protocol GETProtocol { | |
associatedtype GETArguments | |
static func get(_ args: GETArguments) | |
} | |
protocol POSTProtocol { | |
associatedtype POSTArguments | |
static func post(_ args: POSTArguments) |
class APIClient { | |
static func request(endpoint: Endpoint, parameters: Dictionary<String, String>?, handler: (result: Result) -> Void) { | |
// ここで通信 | |
} | |
} | |
enum Endpoint { | |
case Login | |
case Feed(String, Method) | |
// Playground - noun: a place where people can play | |
import Cocoa | |
enum Suit : Int { | |
case Spade, Club, Heart, Diamond | |
func toString() -> String { | |
switch self { | |
case .Spade: |
// AEPositionExporter.jsx | |
function exportPositionData(comp) | |
{ | |
var layers = comp.layers; | |
var file = new File("position.plist"); | |
if (file.open("w")) { |
#import <UIKit/UIKit.h> | |
#import "cocos2d.h" | |
@class GameViewManager; | |
@interface AppController : NSObject <UIApplicationDelegate> | |
{ | |
UIWindow *window_; | |
} |