Giter Site home page Giter Site logo

searchcontrollerdemo's Introduction

Demo of iOS 11 UISearchController In Detail View of UISplitViewController

Strange things happen when using the new iOS 11 navigationItem.searchController method on detail view of a UISplitViewController.

Try running on iPhone, clicking through to detail, and then returning to the page with the search controller - a couple of times. You should note:

  1. UISearchBar not shown initially (although the space is visible)
  2. On clicking an entry the UISearchBar is shown on the APLDetailViewController view.
  3. On returning - no space or UISearchBar.
  4. On clicking an entry again - correct display.
  5. On returning - UISearchBar correctly displayed.

Compare this to iOS 10 and putting in tableHeaderView.

It seems to relate to the extra interposed UINavigationController you get when in Compact mode.

If you do either of the following it will work correctly:

  1. run in Regular size class (ipad or iPhone Plus in Landscape)
  2. change the "showDetail" segue that pushes APLMainTableViewController to modal
  3. reroute the "showDetail" segue that pushes APLMainTableViewController to bypass the Detail UINavigationController (yes this breaks device rotation and resizing - but demonstrates how it relates to the extra UINavigationController )

This code is a combination of the default project for UISplitViewController and the Apple demo of UISearchController.

Any suggestions as to why would be appreciated!

Michael

Build Requirements

  • iOS 11 SDK or later

Runtime Requirements

  • iOS 8.0 or later

searchcontrollerdemo's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.