Revert "[Layout] Layout API based on content area (#2110)"

This reverts commit 8897614f0e.
This commit is contained in:
Adlai Holler
2016-09-07 11:35:19 -07:00
parent 8897614f0e
commit 91e1bd6818
109 changed files with 1300 additions and 2085 deletions

View File

@@ -25,7 +25,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let window = UIWindow(frame: UIScreen.mainScreen().bounds)
window.backgroundColor = UIColor.whiteColor()
window.rootViewController = UINavigationController(rootViewController: ViewController());
window.rootViewController = ViewController()
window.makeKeyAndVisible()
self.window = window
return true

View File

@@ -54,8 +54,7 @@ final class SpinnerNode: ASDisplayNode {
override init() {
super.init(viewBlock: { UIActivityIndicatorView(activityIndicatorStyle: .Gray) }, didLoadBlock: nil)
size.minHeight = ASDimensionMakeWithPoints(44.0)
preferredFrameSize.height = 32
}
override func didLoad() {

View File

@@ -127,15 +127,14 @@ final class ViewController: ASViewController, ASTableDataSource, ASTableDelegate
/// (Pretend) fetches some new items and calls the
/// completion handler on the main thread.
private static func fetchDataWithCompletion(completion: (Int) -> Void) {
let time = dispatch_time(DISPATCH_TIME_NOW, Int64(NSTimeInterval(NSEC_PER_SEC) * 1.0))
let time = dispatch_time(DISPATCH_TIME_NOW, Int64(NSTimeInterval(NSEC_PER_SEC) * 0.5))
dispatch_after(time, dispatch_get_main_queue()) {
let resultCount = Int(arc4random_uniform(20))
completion(resultCount)
}
}
private static func handleAction(action: Action, fromState state: State) -> State {
var state = state
private static func handleAction(action: Action, var fromState state: State) -> State {
switch action {
case .BeginBatchFetch:
state.fetchingMore = true