日本版・韓国版 | 香港版 | US版 | |
---|---|---|---|
カメラのシャッター音 | 絶対鳴る | 消音モードだと鳴らない | 消音モードだと鳴らない |
SIMカードスロット | 物理SIM×1、eSIM×1 | 物理SIM×2 | eSIM×2 |
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
struct Hoge {} | |
extension NSObject { | |
var storedHoge: Hoge { | |
return try! NSObject.creationQueue.sync { () throws -> Hoge in | |
// if stored, use it | |
if let storedInstance = objc_getAssociatedObject(self, &NSObject.storeContextKey) as? Hoge { | |
return storedInstance | |
} | |
// if not stored, create & store, then use it |
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
// | |
// UITextViewExtension.swift | |
// https://gist.github.com/ShoichiKuraoka/9836fa42edf94d5bc390597b5e1bb411 | |
// | |
// Created by ShoichiKuraoka on 2019/03/05. | |
// Copyright © 2018 ShoichiKuraoka. This file is under the MIT License. | |
// | |
extension UITextView { | |
var numberOfLines: Int { |
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
// | |
// ImageGalleryViewController+Kingfisher.swift | |
// https://gist.github.com/ShoichiKuraoka/b7ced78ed3969cad615cd55b0f94c5fa | |
// | |
// Created by ShoichiKuraoka on 2018/12/30. | |
// Copyright © 2018 ShoichiKuraoka. This file is under the MIT License. | |
// | |
import ImageViewer | |
import Kingfisher |
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
import RxSwift | |
final class <#view controller's name#>: UIViewController { | |
// MARK: Property | |
// IBOutlet | |
// viewModel | |
var viewModel: ViewModel = .Default() { | |
didSet { | |
guard isViewLoaded else { return } |
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
// | |
// IBDesignableExtension.swift | |
// https://gist.github.com/ShoichiKuraoka/cfcef64f98519a581dde9987fd02d288 | |
// | |
// Created by ShoichiKuraoka on 2018/12/30. | |
// Copyright © 2018 ShoichiKuraoka. This file is under the MIT License. | |
// | |
import UIKit |
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
import UIKit | |
import RxSwift | |
import RxCocoa | |
final class MSHogeViewController: UIViewController { | |
@IBOutlet weak var mainScrollView: UIScrollView! | |
@IBOutlet weak var subTableView: UITableView! | |
override func viewDidLoad() { |
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
import RxSwift | |
import RxCocoa | |
import NSObject_Rx | |
extension UIView { | |
func addButtonTapLikeGesture(tappingAlpha: CGFloat = 0.15) { | |
self.removeButtonTapLikeGesture() | |
let longPressGestureRecognizer = UILongPressGestureRecognizer() | |
longPressGestureRecognizer.name = gestureNameButtonTapLike | |
longPressGestureRecognizer.minimumPressDuration = 0 |