SHARE
TWEET

Untitled

a guest Aug 13th, 2017 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let alert = UIAlertController(title: "", message: "Message Sample", preferredStyle: .Alert)
  2. alert.addAction(UIAlertAction(title: "Okay", style: .Default){(action)->() in })
  3. presentViewController(alert, animated: true) {}
  4.    
  5. alert.view.transform = CGAffineTransformMakeRotation(CGFloat(M_PI_2))
  6.    
  7. let alert = UIAlertController(title: "", message: "Message Sample", preferredStyle: .Alert)
  8. alert.addAction(UIAlertAction(title: "Okay", style: .Default){(action)->() in })
  9.  
  10. self.presentViewController(alert, animated: true, completion: {() -> Void in
  11.       alert.view.transform = CGAffineTransformMakeRotation(CGFloat(M_PI_2))
  12.  
  13. })
  14.    
  15. let alert = UIAlertController(title: "", message: "Message Sample", preferredStyle: .alert)
  16.     alert.addAction(UIAlertAction(title: "Okay", style: .default){(action)->() in })
  17.  
  18.     self.present(alert, animated: true, completion: {() -> Void in
  19.         alert.view.transform = CGAffineTransform(rotationAngle: CGFloat(Double.pi/2) )
  20.  
  21.     })
  22.    
  23. self.presentViewController(alert, animated: true, completion: {() -> Void in
  24.          // alert.view.transform = CGAffineTransformMakeRotation(CGFloat(M_PI_2))
  25.  
  26.         UIView.animateWithDuration(1.0, delay: 0, options: .CurveLinear, animations: { () -> Void in
  27.             alert.view.transform = CGAffineTransformMakeRotation(CGFloat(M_PI_2))
  28.         }) { (finished) -> Void in
  29.           // do something if you need
  30.         }
  31.  
  32.     })
RAW Paste Data
Top