ターミナルに戻った時に日本語のままで、英語にするのが面倒臭い
https://android.benigumo.com/20220206/auto-switch-ime/
[書籍ごとに入力ソースを自動的に切り替える]が便利だった
ターミナルに戻った時に日本語のままで、英語にするのが面倒臭い
https://android.benigumo.com/20220206/auto-switch-ime/
[書籍ごとに入力ソースを自動的に切り替える]が便利だった
UIPageViewController
クラス使った時に
self.spineLocation = .mid
ができない。
initメソッドでもできない
インスタンス作る時にコンストラクタでやるのだった
※CustomPageViewController
がカスタムクラス
let myPageViewController: CustomPageViewController = CustomPageViewController(transitionStyle: .pageCurl, navigationOrientation: .horizontal, options: [UIPageViewController.OptionsKey.spineLocation: NSNumber(value: UIPageViewController.SpineLocation.mid.rawValue)] )
My friends thought I was crazy when I told them I was quitting my job so I can focus on finishing my novel.
日本語
小説を書き上げることに集中するために仕事を辞めると言ったら、友人たちは私が気の狂った人だと思ったでしょう。
〜なので、〜。みたいに結果が後に来るが、今回はsoが時間のながれとかじゃなく「小説を書き上げることに集中するために」って理由の説明になっている。
so = therefore , for this reason, for that reason, and so, that is why, this is why, then , consequently , accordingly , thus , on account of this, as a result of this, as a result, as a consequence, in consequence
Financialの発音
ai=US fi=UK
UIPageViewControllerで左右のビューを作りたい
https://hajihaji-lemon.com/swift/spine-location/
を参考にした。 Storyboardを使った。
override func viewDidLoad() { super.viewDidLoad() // spineLocationを.midに設定して、見開きで表示 self.spineLocation = .mid let leftViewController = UIViewController() let rightViewController = UIViewController() self.setViewControllers([leftViewController, rightViewController], direction: .forward, animated: true, completion: nil) }
みたいにしたいが、 まず
self.spineLocation = .mid
が設定できない、 readonly
だ・・・
これはStoryboardでやるとしてコメントアウトした。
さらに、
Thread 1: "The number of view controllers provided (2) doesn't match the number required (1) for the requested transition"のエラーが発生した
が発生する。
これは、storyboardで、SpineLocation
を Mid
にしたんだが??
サイトを見たら
1つのビューコントローラーを本の1ページとしたときの本の背の位置を「None」、「Min」、「Mid」、「Max」から選択する。この設定はTransition Styleが「Page Curl」のときのみ有効になる。
とあったので
みたく、「Page Curl」も設定が必須!
transitionStyle も readonly
なのでコードでは設定できなかった。
みたいに UIPageViewController
を継承したViewを設定したほうがいいかもしれない。
コードでは init
をこのようにしたらいけた
init() { let options = [UIPageViewController.OptionsKey.spineLocation : NSNumber(value: UIPageViewController.SpineLocation.mid.rawValue)] super.init(transitionStyle: .pageCurl, navigationOrientation: .horizontal, options: options) } required init?(coder aDecoder: NSCoder) { let options = [UIPageViewController.OptionsKey.spineLocation : NSNumber(value: UIPageViewController.SpineLocation.mid.rawValue)] super.init(transitionStyle: .pageCurl, navigationOrientation: .horizontal, options: options) }