[iOS] Create rounded corner UIView
To make your view has rounded corner, just add the simple code below:
imageView.layer.cornerRadius
And don't forget to add QuartzCore lib unless you want to see nothing happend.
trying on a metaphor

blake kathryn
DEAR READER
No title available
Three Goblin Art
No title available

if i look back, i am lost

@theartofmadeline
todays bird
noise dept.
wallacepolsom
PUT YOUR BEARD IN MY MOUTH

#extradirty

shark vs the universe
d e v o n

Janaina Medeiros
Lint Roller? I Barely Know Her
taylor price
almost home
Xuebing Du
seen from Argentina

seen from Singapore

seen from Türkiye

seen from Singapore

seen from Greece

seen from Malaysia
seen from Mexico

seen from Singapore

seen from Malaysia
seen from United States
seen from Belarus
seen from Belarus

seen from Belarus
seen from Austria
seen from United States
seen from United States

seen from United States
seen from United States
seen from United States
seen from United States
@thecodesnippetteam
[iOS] Create rounded corner UIView
To make your view has rounded corner, just add the simple code below:
imageView.layer.cornerRadius
And don't forget to add QuartzCore lib unless you want to see nothing happend.
[iOS] Take screenshot of UIView
Sometimes, you need to create a receipt or filling data to an e-ticket so that user can save it into their Camera Roll.
Here is how you do it: 1. Create an UIView as a template of your receipt. 2. Put the code below to where you want to create the receipt.
NSString* xibName = @"ReceiptView"; // Your receipt view ReceiptView *targetView = [[[NSBundle mainBundle] loadNibNamed:xibName owner:self options:nil] firstObject]; // This is where you put your data to the view [targetView.priceLabel setText:[NSString stringWithFormat:@"$%@", price]]; // ... CGRect frame = targetView.frame; UIGraphicsBeginImageContext(frame.size); CGContextRef ctx = UIGraphicsGetCurrentContext(); CGContextScaleCTM(ctx, 2, 2); CGContextTranslateCTM(ctx, -targetView.frame.origin.x, -targetView.frame.origin.y); [targetView.layer renderInContext:ctx]; UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); // Request to save the image to camera roll [library writeImageToSavedPhotosAlbum:[viewImage CGImage] orientation:(ALAssetOrientation)[viewImage imageOrientation] completionBlock:^(NSURL *assetURL, NSError *error){ if (error) { NSLog(@"Error writing image"); } else { NSLog(@"Image saved at %@", assetURL); if (success) { success(viewImage); } } }];