Advertisement
undeadhip

Untitled

Feb 4th, 2015
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. func navigationController(navigationController: UINavigationController, willShowViewController viewController: UIViewController, animated: Bool) {
  2.        
  3.         if (navigationController.viewControllers.count == 3) // Indicates UIImagePickerController editing view
  4.         {
  5.             // Remove default crop rect layer
  6.             let plCropOverlay : UIView = viewController.view.subviews[1].subviews[0] as UIView
  7.             plCropOverlay.hidden = true
  8.            
  9.             // Set bottom bar color
  10.             let plBottomBar : UIView = viewController.view.subviews[1].subviews[1] as UIView
  11.             plBottomBar.backgroundColor = UIColor.blackColor().colorWithAlphaComponent(0.8)
  12.            
  13.            
  14.             // Set circular crop overlay
  15.             let fillLayer : CAShapeLayer = CameraController.circleCropOverlayLayer(bottomOffset: 72.0)
  16.             viewController.view.layer.addSublayer(fillLayer)
  17.         }
  18.        
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement