iPhone: Verticle alignment for Numbers in Label in Landscape mode - iphone

I am trying to align label text vertically aligned for my iPhone application Timer. Basically it's a game application and timer value appears in MM:SS format in label in landscape mode. When I have added label and tried to set this value it appears like image 1 which is not correct. I found from many threads that you can set multiple line and make label width as one char but it appears like image 2 which is also wrong. I want my timer value to appear as image 3. Could anyone please tell me how could I achieve it?
Thanks.
[Added real picture of what I am trying to do]

try this
CGAffineTransform transform=CGAffineTransformMakeRotation(300);//change angle according.
transform=CGAffineTransformMakeRotation(-300);//change angle according.
lbl.transform=transform;

Related

Rotation and constraints in swift3 (xcode)

I am using swift3 in xcode.
I have made an application with 10 sliders which I rotate to vertical using:
slider1outlet.transform = CGAffineTransform.init( rotationAngle: CGFloat(-Double.pi / 2))
Same goes for slider 2 through 10 this works without a problem,
but I want to add constraints so they go maximum height and are evenly distributed across the width of the screen, and they adapt when I rotate my screen.
This doesn't seem to work, the constraint seems to turn with the slider and I don't want that.
I have made screenshots (with only 3 sliders just for demo purposes)
the first slider has a red background to show what I mean, here is the screenshot of the application without rotating the sliders:
With the rotating sliders (only 1st slider has red background)
I had exactly the same problem, and it took me forever to figure out. I finally ended up writing my own class exactly for this: VerticalSlider.
Simply make new UISliders in your storyboard and set their classes to VerticalSlider.
It took me countless hours of trial and error in one of my projects to make that, so I'm glad I can finally help somebody else :D

how to make text Moving Persian in basic4android[b4a]

Im have a problem in basic 4 andriod
how to make a text in basic 4 android that moving from left to right and write a moving text???
im need help
Assuming your text is in a label, either call the below code in a for loop or a timer:
label.left=label.left-5 'This moves our label 5 pixels to the left.
The same can be done for any control.
as "mikeward2534" said above you should increase or decrease left property of view such as label and etc.but if you want it infinite moving you should write a condition in Timer that if label is out of phone border start from left or right again.
you can simply use [TextView].SetLayoutAnimated if you want to move a TextView with animation.
hopefully it would help you

custom slider images xcode

I want to make a slider that is a line that is thin at the left (minimum)end and thick at the right (maximum) end and the button which slides between to change sizes between. I have tried setting minimum and maximum track images but this didn't seem to work. I have been able to set the images in IB but they stay the same size. Penultimate has something like I want when you pick the pen size. Any suggestions.

How to center a UIActivityIndicatorView along with text (UILabel)?

I've had this issue come up a couple times doing iPhone development now and have yet to find a good solution for it. What I'm looking for is this:
I want to show some text along with an icon and I want the overall display to be centered within its parent view. Specifically, in my current case, I'm looking to display a box that says "Reconnecting..." with a UIActivityIndicatorView to the left of the text.
Previously, I've just relied on the fact that I know exactly the dimensions of the text and activity indicator, so I can position things absolutely to appear centered. What I'm looking for is something more automatic.
Any ideas?
One of the UIKit additions to NSString will return the pixel size of the text if you give it the font that you're using on the UILabel. So then presumably the total size of the two things together in the layout you describe is:
the difference between label.frame.origin.x and activityIndicatorView.frame.origin.x; plus
the width of the text.
You can then either shuffle both the views appropriately or give them a common parent that's still a subview of the whole thing and shift that.
An activity indicator can be shown in a view just calling a single method.Please click here get SHKActivityIndicator class

UIImageView renders image differently to original

The image on the right is the one that I produced in photoshop. I then stripped all text and put it in an image view, as soon as I did that there was a change in colour and the vertical line lost it sharpness. Has anyone else run into a similar problem? What do I do?
alt text http://grab.by/1DuZ
Are the dimensions correct? Is the position of the image an integer? If these cases antialiasing will slightly blur your image.
One thing to be careful of is that if your image is an odd number of pixels in either dimension then centering it onscreen will cause it to be misaligned. Imagine if you had a 1x1 image (just one pixel) and tried to center it perfectly onscreen. It can't be done because the screen is an even number of pixels wide and high. This is why it's best to always use even dimensioned images whenever possible.