タグ

UITableViewとswiftに関するstiloのブックマーク (3)

  • UITableViewHeaderFooterView

    UITableView is the bread and butter of iOS apps. This is as true today as it was with the first iPhone over a decade ago. Back in those early days, developers worked hard to achieve smooth scroll performance — often resorting to extreme measures. For example, to achieve 60FPS on a table view with custom cells on an iPhone 3G you’d often have to draw text directly to a cell’s Core Graphics context,

    UITableViewHeaderFooterView
    stilo
    stilo 2019/04/09
    UITableViewHeaderFooterView の使い方がわかりやすく説明されています。 #Swift
  • iOS11のInsetsとLayout - Qiita

    半透明のナビゲーションバーやタブバーを配置して、下のテーブルの内容が潜り込んで見えるようにする場合、Insetsでその量を指定します。 iOS10の時は、「Adjust Scroll View Insets」にチェックを入れると、配置しているTableViewなどScrollView系のコンポーネントのContentInsetsが自動的に設定される仕組みになっていました。 iOS11からは、contentInsetsではなく、SafeAreaInsets → adjustedContentInset にその量が反映されるようになります。 「Adjust Scroll View Insets」(コードでは UIViewController.automaticallyAdjustsScrollViewInsets)はiOS11でdeprecatedになりました。 Viewのレイアウトも、iOS

    iOS11のInsetsとLayout - Qiita
    stilo
    stilo 2017/10/16
    『iOS11からは、contentInsetsではなく、SafeAreaInsets → adjustedContentInset にその量が反映されるようになります。』
  • UITableViewの上にUIButtonをスクロールせず固定して表示する方法! — ALL-IN Tech Blog

    UITableViewの上にUIButtonをスクロールせず固定して表示する方法! こんにちわ! Railsエンジニアの @hbd225 です。 最近は仕事のあとswift書いてたりですので、swiftネタです! 初めてAirbnbのアプリを見たときは細かいところまでUIが作り込まれててすごいなーと感動したものですが、Airbnbの検索アイコンやメルカリの出品ボタンなど、UITableViewの上にボタンがスクロールされず固定されて表示されてる感じの素敵なUIをよく見かけますので、実装方法について調べてみました! 先に結論 UITableView のセル上に直接ボタンを追加しても、スクロールすると画面外に消えてしまいますので、ContainerView を配置して Embed segue で UITableView を繋いで実装することで、ContainerView の上に固定されてスクロ

    UITableViewの上にUIButtonをスクロールせず固定して表示する方法! — ALL-IN Tech Blog
  • 1