How to round UIIMage with CGContext
How to round UIIMage with CGContext func roundedRectImageFromImage(image: UIImage ! ,radious: CGFloat ) -> UIImage !{ if (radious == 0.0 ){ return image; } if ( image != nil ) { let imageWidth: CGFloat = image. size . width ; let imageHeight: CGFloat = image. size . height ; let rect: CGRect = CGRectMake ( 0.0 , 0.0 , imageWidth, imageHeight); let window: UIWindow = UIApplication . sharedApplication (). windows [ 0 ] //[[[UIApplication sharedApplication] windows] objectAtIndex:0]; ...