Showing posts with label Objc. Show all posts
Showing posts with label Objc. Show all posts

Monday, 21 December 2015

Change UIIMage background color in iOS


5Change UIIMage background color in iOS.jpg
Here is a function which returns an image with different background of you choice.
  1. - (UIImage* )setBackgroundImageByColor:(UIColor *)backgroundColor withFrame:(CGRect )rect{

  2. // tcv - temporary colored view
  3. UIView *tcv = [[UIView alloc] initWithFrame:rect];
  4. [tcv setBackgroundColor:backgroundColor];


  5. // set up a graphics context of button's size


Read full blog at our highly specific C, Java, PHP, Javascript, android, iOS developer forum about the topic described above "Change UIIMage background color in iOS". You can also learn much more about different programming technologies and can enhance your tech skills.

Monday, 22 June 2015

UIImage Cropping in Objc

Sometimes we click picture from ios camera but it does not return us the same image as appears inside the camera frame. Use below function to get an image of exact size which was visible through camera.
Follow these Steps:-
Step 1. First of all set the captured image to an UIImageView.
Step 2. Pass that camera uiview to below function so that we can get visible frame of opened camera view.
Step 3. Also pass the UIImage (captured photo) as a param to below function.
To Read complete information about “UIImage Cropping in Objc” visit FindNerd. As it is an effective technology forum, so here you can also ask questions & look for various programming queries along with their solutions including Android, C, Java, php programming questions and answers etc.

Monday, 15 June 2015

How to set Camera view aspect ratio in iOS

Sometimes we face problem with Camera view aspect ratio in ios. Solution to this problem is here.. Set its aspect ratio property to AVLayerVideoGravityResizeAspectFill. It actually preserve aspect ratio; fill layer bounds.
  1. AVLayerVideoGravityResizeAspectFill may be used when setting the videoGravity
  2. property of an AVPlayerLayer or AVCaptureVideoPreviewLayer instance.
For full blog of  “How to set Camera view aspect ratio in iOS” visit FindNerd & for more iPhone blogs visit our iPhone development blogs section.
You can also ask questions & look for various programming queries along with their solutions including Android, C, Java, php programming questions and answers etc. as it is an effective technology forum also.

Friday, 12 June 2015

Make UIImage White Background Transparent in iOS

If you came across to a requirement where you want to make UIImage Background Transparent then use below method to achieve it.
  1. +(UIImage *)changeWhiteColorTransparent: (UIImage *)image{
  2. CGImageRef rawImageRef=image.CGImage;
  3. const CGFloat colorMasking[6] = {222, 255, 222, 255, 222, 255};
To Read complete information about “Make UIImage White Background Transparent in iOS” visit FindNerd. Apart from this, you can also ask questions & look for various programming queries along with their solutions including Android, C, Java, Php programming questions and answers etc. as it is an effective technology forum also.