View xcodebuild build-for-testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xcodebuild \ | |
build-for-testing \ | |
-workspace XXX.xcworkspace \ | |
-scheme XXX_SCHEME \ | |
-destination 'platform=iOS Simulator,name=iPhone 11' \ | |
-derivedDataPath ./build/iOS/ |
View bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git commit --allow-empty -m "Empty message" |
View brew_switch_swiftformat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew switch swiftformat XXX | |
Before above check that you have requested swiftformat version. In my case it was here: | |
/usr/local/Cellar/swiftformat | |
Example: | |
brew switch swiftformat 0.37.5 |
View file.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func rotate(image: UIImage, clockwise: Bool) -> UIImage { | |
var rotatedImage: UIImage? | |
let rotateSize = CGSize(width: image.size.height, height: image.size.width) | |
UIGraphicsBeginImageContextWithOptions(rotateSize, false, 1.0) | |
guard let context = UIGraphicsGetCurrentContext() else { | |
return image | |
} |
View shadow.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<shape xmlns:android="http://schemas.android.com/apk/res/android" | |
android:shape="rectangle"> | |
<gradient | |
android:startColor="@android:color/transparent" | |
android:endColor="#44000000" | |
android:angle="90"/> | |
</shape> |