- 更新
2024-05-22
- 作者
@voluntas
- バージョン
2024.1
- URL
typo などは https://x.com/voluntas までご連絡ください。
2024-05-22
@voluntas
2024.1
typo などは https://x.com/voluntas までご連絡ください。
Author: Chris Lattner
#include <opencv2/core/core.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include <opencv2/features2d/features2d.hpp> | |
#include <opencv2/imgproc/imgproc.hpp> | |
#include <opencv2/video/video.hpp> | |
#include <iostream> | |
using namespace cv; | |
using namespace std; |
2024-04-16
@voluntas
2024.1
概要
// | |
// Created by はるふ on 2017/12/11. | |
// Copyright © 2017年 ha1f. All rights reserved. | |
// | |
import Foundation | |
import CoreImage | |
import AVFoundation | |
extension CIFilter { |
#!/bin/sh | |
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
# make sure the output directory exists | |
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" | |
# Step 1. Build Device and Simulator versions | |
xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build | |
xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build |
extension UIImage { | |
func fixedOrientation() -> UIImage { | |
if imageOrientation == UIImageOrientation.Up { | |
return self | |
} | |
var transform: CGAffineTransform = CGAffineTransformIdentity | |
\lstdefinelanguage{swift} | |
{ | |
morekeywords={ | |
func,if,then,else,for,in,while,do,switch,case,default,where,break,continue,fallthrough,return, | |
typealias,struct,class,enum,protocol,var,func,let,get,set,willSet,didSet,inout,init,deinit,extension, | |
subscript,prefix,operator,infix,postfix,precedence,associativity,left,right,none,convenience,dynamic, | |
final,lazy,mutating,nonmutating,optional,override,required,static,unowned,safe,weak,internal, | |
private,public,is,as,self,unsafe,dynamicType,true,false,nil,Type,Protocol, | |
}, | |
morecomment=[l]{//}, % l is for line comment |
XcodePreviews は SwiftUI で記述された UI を Xcode 上でプレビューするための新しい拡張機能です。 SwiftUI と UIKit には互換性があるため、 UIKit で構築された UI を XcodePreviews でプレビューさせることも可能です。
これによって、アプリケーションの再コンパイル・再実行なしに UI の変更を即時プレビューすることを可能にします。
今回は、この XcodePreviews がどのような仕組みで実現されているのかを解説します。
XcodePreviews を実現するために新しく導入された Build artefacts を調べるために PreviewsSample
という Single View App を作成しました。このプロジェクをビルドし、プレビュー可能な状態にしたときの Build artefacts が以下です。新しい中間ディレクトリとして Previews
ディレクトリが作成されていることがわかります。
$ tree --filelimit 40 ~/Library/Developer/Xcode/DerivedData/PreviewsSample-bwzdqecwyvbvpofgqyzocvibrlbd