This file contains hidden or 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
| curl \ | |
| --header "Authorization: key=ご自身のAPI_KEY" \ | |
| --header Content-Type:"application/json" \ | |
| https://fcm.googleapis.com/fcm/send \ | |
| -d "{ | |
| \"to\" : \"/topics/何か適当に\", | |
| \"time_to_live\" : 0, | |
| \"restricted_package_name\" : \"bundle id\", | |
| \"notification\" : { | |
| \"sound\" : \"default\", |
This file contains hidden or 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
| let _0_delay = 3.0 * Double(NSEC_PER_SEC) | |
| let _0_time = DispatchTime.now() + Double(Int64(_0_delay)) / Double(NSEC_PER_SEC) | |
| DispatchQueue.main.acyncAfter(deadline: _0_time, execute: { | |
| }) | |
| DispatchQueue.main.acyncAfter(deadline: DispatchTime.now() + Double(Int64(3.0 * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC), execute: { | |
| }) |
This file contains hidden or 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
| if [[ ${CONFIGURATION} == "Release" ]]; then | |
| buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PRODUCT_SETTINGS_PATH}") | |
| buildNumber=$(($buildNumber + 1)) | |
| /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PRODUCT_SETTINGS_PATH}" | |
| echo "[UpdateBuildNumber Release] CFBundleVersion Increment ${buildNumber}" | |
| else | |
| buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PRODUCT_SETTINGS_PATH}") | |
| echo "[UpdateBuildNumber Debug] CFBundleVersion Not Increment ${buildNumber}" | |
| fi |
This file contains hidden or 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
| /// | |
| /// UIPopoverPresentationControllerDelegate | |
| /// | |
| /// 画面の回転対応 | |
| /// | |
| func popoverPresentationController(_ popoverPresentationController: UIPopoverPresentationController, willRepositionPopoverTo rect: UnsafeMutablePointer<CGRect>, in view: AutoreleasingUnsafeMutablePointer<UIView>) { | |
| let baseView = 起点としたいView | |
| view.pointee = baseView | |
| rect.pointee = baseView.bounds |
This file contains hidden or 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
| let Str: String = "123456789" | |
| /// | |
| /// 先頭1文字 - 1 | |
| /// | |
| print("\(Str.substring(to: Str.index(after: Str.startIndex)))") | |
| /// | |
| /// 先頭1文字以外 - 23456789 | |
| /// | |
| print("\(Str.substring(from: Str.index(after: Str.startIndex)))") |
This file contains hidden or 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
| /// | |
| /// アニメーション表示 | |
| /// | |
| self.constraintBottom.constant = 0 | |
| UIView.animate(withDuration: 0.1, animations: { [weak self] in | |
| self?.layoutIfNeeded() | |
| }, completion: nil) | |
| /// | |
| /// アニメーション非表示 |
This file contains hidden or 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
| /// | |
| /// CstmVideoEditorController | |
| /// | |
| class CstmVideoEditorController: UIVideoEditorController { | |
| /// | |
| /// will appear | |
| /// | |
| override func viewWillAppear(_ animated: Bool) { | |
| super.viewWillAppear(animated) | |
| for v in self.navigationBar.subviews { |
This file contains hidden or 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
| import UIKit | |
| import AVFoundation | |
| import Photos | |
| /// | |
| /// アルバム保存コントローラーサンプル | |
| /// | |
| class SaveAlbumSample: NSObject { |
This file contains hidden or 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 numberOfSections(in tableView: UITableView) -> Int { | |
| return 1 | |
| } | |
| func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
| return 10 | |
| } | |
| func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { | |
| /// 0.0だと33pxの余白が発生したので0.1を定義 |
This file contains hidden or 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
| #!/usr/bin/swift | |
| import Cocoa | |
| class fileMG { | |
| var dir: String | |
| var file: String |