I have an image in my UIimageview and when I move the location of the View the image inside gets offset… for example I can have a 10×10 ImageView and a 10×10 Image inside then when I move the view the image is printed at -1, -1 of the View so it is clipped. Any suggestions
here is the code
node2.frame = CGRectMake(nodex2-5, nodey2-5, 10, 10);
In my experience such problems often arise when using double data types for position variables. For example, if nodex2 and nodey2 are floating point data type with non integer values the alignment of the image can change while sliding it around. Switching the variables to integer types or casting them before passing into CGRectMake would solve the problem if this is your issue.