Created
November 29, 2016 05:23
-
-
Save haruair/6ff87b156106bba8b2e993b3eeedf851 to your computer and use it in GitHub Desktop.
비스무리하게 구현하면
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DefaultLayout : Layout { | |
let definitions = [ | |
Definition(PickButton.self, BottomButtonRepresentation.self), | |
Definition(CameraView.self, FullScreenRepresentation.self), | |
Definition(OverlayFlashView.self, FullScreenRepresentation.self), | |
] | |
} | |
class Definition { | |
var elementType : Any? | |
var representationType : Any? | |
init (_ ele: Any, _ rep: Any) { | |
if ele is UIView { | |
elementType = ele | |
} else { | |
print("Error") | |
return | |
} | |
if rep is Representation { | |
representationType = rep | |
} else { | |
print("Error") | |
return | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment