iPhone app - load an UIImage and the put a small positional icon (image) on it? - iphone

I have looked everywhere for what should be a simple concept. I can load an image(s) with UIView/UIImageView and just want to place a smaller icon/image on top of the original image at a given position. Thanks in advance for your help.

Create another UIImageView with the second image and position it on top of the first one.

Related

Swift how to show only part of image?

I have got an image 300px300px, but i only want to show 100x100 of it, just like here https://www.pinterest.com/pin/31103053652400980/ background photo is only showing part of it.How can i do that?
You can use UIImageView that has property Clip To Bounds on. After that you can change Content Mode of the `UIImageView' that suits you.
Example:

Make fix size round button as image in iphone sdk

I am developing an application in which I need to round button as image (as I uploaded).
It Show two corner are straight and the rest is in round shape. I tried withmybutton.layer.cornerRadius but make round whole image. I also tried to just make custom button but it leave extra space in button around image i need to fix size button as image show.
Please help me. Thanks in advance. Happy Day.
Here is a one good tutorial on this:
http://iphonedevelopment.blogspot.in/2010/03/irregularly-shaped-uibuttons.html
you can download code from here
https://github.com/ole/OBShapedButton
Hope this helps
An alternate but not really a good one first add an imageView add this particular image over it than add an custom invisible button over the image by adjusting size of the button it will not cover the whole image though but still it will work fine...actually i did use this approach in one of my app :p
OBShapedButton might help. It's an open source UIButton subclass optimized for non-rectangular button shapes. If it still doesn't work, making your own buttons isn't that difficult either. Use a UIView and handle touches within the view. For eg, in touchesMoved:, set the active image and in touchesEnded:, handle the click event!

Zoom Image and store the visible Image

I am working on module where I need to perform following activities.
Select image from Library.
Show that image.
Zoom that image.
Save the Zoomed portion or visible portion on the view.so that final image will get saved with zoomed.
I have covered 1,2,3 and struggling with 4
Does anyone have idea about this?
Thanks,
Sagar
If I understand you correctly, you want to save image that appears on the screen after zooming? To do that you can use CGImageCreateWithImageInRect function.

Modifying, coloring and dragging pre-existing images iPhone application

I am developing an iphone application which would let me modify the image by dragging other images over its top along with functionality that would let me choose a specific color from the image and replace it with some other color shades i choose. If anyone has some clue like how to actually implement it or some code, that would be great help for me to proceed in right direction
Thanks in advance :)
If you just want to overlay images, you can simply drag UIImageViews around and position them within the view hierarchy such that the appropriate images are overlaid one on top of the other.
For generating a new image out of those composited images, you may want to use something like CGContextDrawImage() within a UIView subclass's -drawRect: method or in a custom CGContext. You can also refer to these similar questions:
How can we combine images and get image object from this two images in iphone apps
Combining images
As far as selectively replacing a specific color within a UIImage, that's a commonly asked question here:
In a UIImage (or its derivatives), how can I replace one color with another?
How to make one color transparent on a UIImage?

how to animate some portion of images?

I am implementing fun application.In which i want to animate some area(portion) of images.
I dont know how it possible.If u have any idea then please help me.
If you're looking to animate a portion of an image you could just create a smaller animation and put it at the right relative location inside a larger image.
If you want to know how to animate images in general, that's a different question entirely.