Showing posts with label UIImage. Show all posts
Showing posts with label UIImage. 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.

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.