This repository was archived by the owner on Jul 1, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
ALCameraViewController/ViewController Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -46,10 +46,10 @@ extension CameraViewController {
4646
4747 let attribute : NSLayoutAttribute = {
4848 switch statusBarOrientation {
49- case . portrait: return . bottom
50- case . landscapeRight: return . right
51- case . landscapeLeft: return . left
52- default : return . top
49+ case . portrait: return . bottomMargin
50+ case . landscapeRight: return . rightMargin
51+ case . landscapeLeft: return . leftMargin
52+ default : return . topMargin
5353 }
5454 } ( )
5555
@@ -60,7 +60,7 @@ extension CameraViewController {
6060 toItem: view,
6161 attribute: attribute,
6262 multiplier: 1.0 ,
63- constant: attribute == . right || attribute == . bottom ? - 8 : 8 )
63+ constant: - 8 )
6464 view. addConstraint ( cameraButtonEdgeConstraint!)
6565 }
6666
@@ -184,8 +184,8 @@ extension CameraViewController {
184184
185185 switch statusBarOrientation {
186186 case . portrait:
187- attributeOne = . topMargin
188- attributeTwo = . bottomMargin
187+ attributeOne = . top
188+ attributeTwo = . bottom
189189 break
190190 case . landscapeRight:
191191 attributeOne = . left
@@ -196,8 +196,8 @@ extension CameraViewController {
196196 attributeTwo = . left
197197 break
198198 default :
199- attributeOne = . bottomMargin
200- attributeTwo = . topMargin
199+ attributeOne = . bottom
200+ attributeTwo = . top
201201 break
202202 }
203203
You can’t perform that action at this time.
0 commit comments