LoginSignup
28
21

More than 5 years have passed since last update.

The Futureというアプリを作ろうとしていたが、iOS10の仕様変更で断念した話

Last updated at Posted at 2016-09-29

はじめに

ある名前のアプリを作りたいと思って、今までにリリースしてきたライブラリを以下のような命名規則で揃えてきました。

MisterFution (230 stars 2016/9/29)

Objective-CとSwiftのどちらでも使える、Swift製のAutoLayout向けのDSLです。
下記のコードのように、コードを削減することができます。
superviewとのConstraintを実装する場合には、toViewをsuperviewにするという指定を省略できることが特徴です。

//NSLayoutConstraintのサンプルコード
let view = UIView()
self.view.addSubview(view)
view.translatesAutoresizingMaskIntoConstraints = false
self.view.addConstraints([
    NSLayoutConstraint(item: view, attribute: .top,    relatedBy: .equal, toItem: self.view, attribute: .top,    multiplier: 1, constant:  10),
    NSLayoutConstraint(item: view, attribute: .right,  relatedBy: .equal, toItem: self.view, attribute: .right,  multiplier: 1, constant: -10),
    NSLayoutConstraint(item: view, attribute: .left,   relatedBy: .equal, toItem: self.view, attribute: .left,   multiplier: 1, constant:  10),
    NSLayoutConstraint(item: view, attribute: .bottom, relatedBy: .equal, toItem: self.view, attribute: .bottom, multiplier: 1, constant: -10),
])
//MisterFusionを使ったNSLayoutConstraintのサンプルコード
let view = UIView()
self.view.addLayoutSubview(view, andConstraints:
    view.top    |+| 10,
    view.right  |-| 10,
    view.left   |+| 10,
    view.bottom |-| 10
)

詳しい使い方は、こちらで紹介しています。

MartyJunior (217 stars 2016/9/29)

スワイプによるタブ選択を実現しつつ、縦のスクロールが2段階にならずにヘッダーとも連動できるUIライブラリです。
該当のタブのUITableViewをスクロールした際に、他のタブの要素が足りなかった場合の保管なども行われています。

HoverConversion (125 stars 2016/9/29)

UITableViewの縦のスクロールに合わせて、UIViewControllerが縦方向にページングすることができるUIライブラリです。
ルートにあるViewControllerと連動させることで、現在表示中のViewControllerと紐付いているCellをハイライトすることができます。

詳しい使い方は、こちらで紹介しています。

お気づきの方もいらっしゃるかもしれませんが...

bttf.png

これらのライブラリは、Back to the futureに出てくるものと関連しています。

  • MR. FUSION... エネルギーを生成する装置

  • Marty McFly Jr.... マーティの息子

  • Hover Conversion... デロリアンを飛行可能にする装置

iOS9での"アプリに戻る"ボタン

アプリから他のアプリに遷移した際に、"アプリに戻る"ボタンが表示されます。

back.jpg

端末の設定を英語表記にすると...

ios9_navigation.png

なんとBack to the futureになるではありませんか!

悲劇はここから

iOS10にアップデートすると表記が...

ios10_navigation.png

◀ The Future ・・・ えっ

最後に

iOS10からの"アプリに戻る"ボタンが◀ アプリ名に変わってしまったので、端末上でさり気なくBack to the futureを表示することはできなくなってしまいましたが、引き続きライブラリ名はBack to the future絡みの名前にしていこうと思います。(過去に戻りたい...)

Xkkd7.jpg

28
21
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
28
21