Demo entry 6354426

oc

   

Submitted by anonymous on Apr 06, 2017 at 20:22
Language: Objective-C. Code size: 687 Bytes.

float w = 214;  
float h = 135;  
  
self.photoBgView = [[UIView alloc] initWithFrame:(CGRectMake(0, 64, self.view.width, h))];  
self.photoBgView.backgroundColor = [UIColor groupTableViewBackgroundColor];  
self.photoView = [[UIImageView alloc] initWithFrame:(CGRectMake(0, 0, w, h))];  
self.photoView.contentMode = UIViewContentModeScaleAspectFit;  
self.photoView.centerX =self.photoBgView.width/2;  
[self.view addSubview:self.photoBgView];  
[self.photoBgView addSubview:self.photoView];  
self.originalImage =[UIImage imageNamed:@"image_sample"];  
self.processedImage = self.originalImage;  
self.photoView.image =   self.processedImage;  
self.processGrayed = NO;

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).