         view.layer.borderColor = UIColor.redColor().CGColor
         view.layer.borderWidth = 1
         return view
+    }
+
+    private func setupPortraitLayout() {
+        switch traitCollection.userInterfaceIdiom {
+        case .Phone:
+            setupPhonePortraitLayout()
+        case .Pad:
+            setupPadPortraitLayout()
+        default:
+            println("unknown device:\(traitCollection.userInterfaceIdiom.rawValue)")
+        }
+    }
+
+    private func setupLandscapeLayout() {
+        switch traitCollection.userInterfaceIdiom {
+        case .Phone:
+            setupPhoneLandscapeLayout()
+        case .Pad:
+            setupPadLandscapeLayout()
+        default:
+            println("unknown device:\(traitCollection.userInterfaceIdiom.rawValue)")
+        }
     }
 
     private func setupPhonePortraitLayout() {

        baseView.addSubview(infoView)
        miniView = createView(UIColor.yellowColor())
        baseView.addSubview(miniView)
    }

    override func traitCollectionDidChange(previousTraitCollection: UITraitCollection?) {
        if traitCollection.verticalSizeClass == .Regular {
            setupPhonePortraitLayout()
        }
        else if traitCollection.verticalSizeClass == .Compact {
            setupPhoneLandscapeLayout()
        }
        else {
            println("verticalSizeClass(\(traitCollection.verticalSizeClass.rawValue)) is not support.")
        }
    }


            miniView[.Bottom] == baseView[.Bottom] - 8,
            ])
    }

    private func setupPadPortraitLayout() {
        setupPhonePortraitLayout()
    }

    private func setupPadLandscapeLayout() {
        setupPhoneLandscapeLayout()
    }
}
