iOS Autolayout constraints for label - ios7

How to set constraints to a label on imageview to display it at same position on all devices.Please check the image. The red label should be in the white empty box in image.
Thnx in advance.enter image description here

Related

Objective C: Creating rotated Image inside square?

For an arduino drawing robot i want to rotate an image by 45 degrees in an iOS app, so that the new (rotated image) is inside a white box. Imagine the blue rectangle in the picture was the original image, and the image. As you can see it is rotated an inside a white square. How could I do this? It is important not only to have a rotated image, or a rotated image which has a white box behind it on the screen. It actually has to be a new image, so that if i get the color of pixel (1,1) it is white.
You can try to do this with having a white UIView superview, and blue UIView subview. And then do:
subview.transform = CGAffineTransformMakeRotation(M_PI/4);
superview.bound = subview.frame;
I think it should work.

xcode6 storyboard uibutton image title laybout

how can i set button's image and title correctly position.
now the storyboard preview like:
I add title and image to the button and set title and image edgeinset to get picture layout. but the button'size is changed with the phone size. so i can't set it in storyboard properly for all size.
i want to to know is there a way to deal with this situation?
thanks!
see the tutorial link below ,
http://www.appcoda.com/introduction-auto-layout/
it's show how to fix constant heigh and width of view.
you see clear in image how it done.

Transparent table view over map

I am trying to put a transparent table view over a map. First, I set backgroundcolor as clearColor and it didn't work. Then I set alpha on the table view as 0.5 then it is transparent but text in labels also transparent. I want to see through the map but text in label should stand out. I reset the alpha on the label but it is still not effective. How can I do this in iOS7?
Thanks!
You need to set the background color of each table cell as clearColor. Set this in your cellForRowAtIndexPath method.

how to set transparent image background color to theme color in qml

is it possible to set a background color to a transparent image in QML, so that the image will take the theme color as it's baclground color.
thanks...
Put your transparent Image over a coloured Item (like a Rectangle).
You just need to set z property of the Image greater than the Rectangle's one.

Rotating UILabel is clipping text

I have a UILabel that I am trying to rotate. First I am calling sizeToFit on the label, adding a little padding to the frame and then setting the transform to CGAffineTransformMakeRotation(rotation) (where rotation is a value calculated from a UIRotationGestureRecognizer).
Some of the text is being clipped as the UILabel is rotated (as illustrated in the image linked below). For demonstrative purposes, I made the UILabel's background color red so you can see how the bounds change when it is rotated. How do I prevent this from happening?
http://cl.ly/image/3F0M420R0d14
Thanks.