custom slider images xcode - ios5

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.

Related

Unity - UI Positions

I currently have a problem on a UI.
The button on the phone moves when changing resolution and changes size as well. On the screenshots, it is in the General Panel. I also tried to put a second panel of the size of the phone, but it is all this panel that moves and changes size. How can I do, to keep the buttons at the right size and in place, as the background does when changing resolution?
Thanks in advance !
You need to change the UI Scale Mode to "Scale With Screen Size".
THe Reference Resolution can help you place items in the editor. You can choose wether you want the width or the height (or a mixture) to be preferred when fitting the canvas to the resolution.
If you, for example, choose "Width" in the "Match" slider, the elements will never overshoot horizontally. This would be perfect for wrapping textfields.

Getting button image to stick to left side swift xcode

Currently trying to add a login with facebook button with xcode 7 beta. However, I have noticed that whenever I readjust the image's width, it seems to leave to left side which is where I want it to stay to the left margin. I am getting this image through the image option when I used the button.
I met the same situation before. In that time, I adjust image inset in storyboard option.
Change image in Edge, and then adjust inset as you like.
But sometimes it doesn't work in my case(ex. the image size is so big). If so, you adjust the original image size.

touch button aerea (iPhone,iPad)

I have got this situation:
this is the photo: http://imageshack.us/photo/my-images/826/iconepe.png/
the two images are little 20 pixel x pixel, If I click on them, nothing happens, if I click oh the left on them, the link works. I should make images bigger?
My guess is that you are missing the buttons with your finger.
The comfortable minimum size of tappable UI elements is 44 x 44
points.
According to the iOS Human Interface Guidelines
If you need to keep the images this small, one workaround would be to increase the size (frame) of the button and keep the image (the image must be set as a button image, not background image). This way you'd have a bigger zone that will accept input and still use the same image.
Ask your designer to make the image bigger, by using a transparent space around it.. 20x20 is too small to touch.. Apple says that the avg finger tap is 44x44 (from WWDC). All table rows are recommended to be at least that height. Use a transparent padding to make your image atleast 44 * 44.

How to create a custom slider with custom selected and unselected images?

I need to create a slider which should have custom images for following slider parts:
left round corner image.
left part image which is selected part.
right part image which is
unselected or remaining part.
right corner image.
Thumb image.
Also i want to increase the thickness of the slider.
Please give me some suggestion or share some code snippets.
Thanks,
Look at setThumbImage:forState to change thumb image.
minimumValueImage and maximumValueImage for the images on the left and right hand side of the slider.
The track images can also be manipulated.
See "Customizing the slider's appearance" at http://developer.apple.com/library/ios/#documentation/uikit/reference/UISlider_Class/Reference/Reference.html

iOS playing cards

I currently have an image which has every suit and value of a deck of playing cards in it. There is an UIImageView to show this picture, with width and height set to show just one card at a time and view mode set to "top left" so it doesn't stretch.
Now I'm just showing what happens to be the top left card, the ace of clubs. I tried finding a way to offset the view to show a different portion of the UIImage, but couldn't find a suitable property (tried fiddling with "frame" and "bounds").
Is there a way to get such an offset working, or am I going about this the wrong way? I'd like to keep all the cards in one image in "sprite sheet" style so that they would be easy to modify later instead of having a bunch of separate pics.
Set the bounds to what you'd like to show, enable 'clipToBounds' and make sure the content stretch mode is set properly. That should work.
EDIT: I do recommend making different images though, because of memory issues (even though not the whole image is shown, you still fully have it in memory).