The documentation for `UITableViewDataSource` specifies that the default value is 1, and that its implementation is optional. However, ASTableView's forwarding doesn't account for the unimplemented case. The desired behavior is to return 1 in the case that the method is not implemented.
Introduce `ASTableView`, a UITableView subclass that uses `ASCellNode`
instead of UITableViewCell. Add working range support via
`ASRangeController`, which observes the visible range, maintains a
working range, and handles most ASDK machinery. ASRangeController is
loosely-enough coupled that it should be easily adapted to
UICollectionView if that's desired in the future.
Notable considerations in the ASRangeController architecture:
* There's no sense rewriting UITableView -- the real win comes from
using nodes instead of UITableViewCells (easily parallelisable
computation, large number of cells vs. few table views, etc.). So,
use a UITableView with empty cells, using UITableViewCell's
contentView as a host for arbitrary node hierarchies.
* Instead of lazy-loading cells the instant they're needed by
UITableView, load them in advance. Preload a substantial number of
nodes in the direction of scroll, as well as a small buffer in the
other direction.
* Maintain compatibility with UITableView's API, with one primary change
-- consumer code yields configured ASCellNodes, not UITableViewCells.
* Don't use -tableView:heightForRowAtIndexPath:. Nodes already compute
their preferred sizes and cache results for use at layout-time, so
ASTableView uses their calculatedSizes directly.
* Corollary: ASTableView is only aware of nodes that have been sized.
This means that, if a cell appears onscreen, it has layout data and
can display a "realistic placeholder", e.g. by making its subnodes'
background colour grey.
Other improvements:
* Remove dead references and update headers (fixes#7, #20).
* Rename `-[ASDisplayNode sizeToFit:]` to `-measure:` and fix
`constrainedSizeForCalulatedSize` typo (fixes#15).
* Rename `-willAppear` and `-didDisappear` to `-willEnterHierarchy` and
`-didExitHierarchy`. Remove `-willDisappear` -- it was redundant, and
there was no counterpart `-didAppear`.
* Rename `viewLoaded` to `nodeLoaded`.
Even though the UI showed the newest version that the device can install, the download request always triggered downloading the latest version.
This commit fixes this bug.
In iOS 8 the app is not moved to background once the users accepts the iOS install alert button. Without this, the install process doesn't start. So for now we exit the app once that alert disappears.
Important: The iOS dialog offers the user to deny installation, we can't find out which button was tapped, so we assume the user agreed.
iOS Frameworks use an extra `Modules/module.modulemap` file that is used with the `import` statement to get all required information for integration. We simulate this behavior by writing our own file manually. So in apps using Swift the Objective-C bridging header is not required any longer (when using the binary distribution of the framework).
Use `kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly` instead of `kSecAttrAccessibleWhenUnlockedThisDeviceOnly` when storing data into the keychain to allow the data to be also fetched when the app is launched in the background
Notify the developer about the issues by logging a warning to the console when the SDK is initialized more than once or startManager is invoked multiple times
If the `configure` initializers or `startManager` are invoked multiple times, this can cause undefined behaviour and crashes. Hence we simply ignore if they are invoked multiple times.
Resizable iPhone causes modal presentations not to be full screen any longer, so we always should use the views width and never the device-width for the version update data presentation. This also works just fine when build with iOS <= 7.1.x
The warning about `delegate` setting after calling `startManager` being incorrect, should actually only be shown if it was called after it and not before it. Doh.
iOS Frameworks use an extra `Modules/module.modulemap` file that is used with the `import` statement to get all required information for integration. We simulate this behavior by writing our own file manually. So in apps using Swift the Objective-C bridging header is not required any longer (when using the binary distribution of the framework).
Use `kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly` instead of `kSecAttrAccessibleWhenUnlockedThisDeviceOnly` when storing data into the keychain to allow the data to be also fetched when the app is launched in the background
Notify the developer about the issues by logging a warning to the console when the SDK is initialized more than once or startManager is invoked multiple times
If the `configure` initializers or `startManager` are invoked multiple times, this can cause undefined behaviour and crashes. Hence we simply ignore if they are invoked multiple times.
Resizable iPhone causes modal presentations not to be full screen any longer, so we always should use the views width and never the device-width for the version update data presentation. This also works just fine when build with iOS <= 7.1.x