How to make view like in the image attached? - iphone

I want to implement the UI feature as in the image attached. The image is an screen shot form a Siemens App that is in App store. Here the bright portion can be rotated like wheel. I have gone through the link
http://www.raywenderlich.com/9864/how-to-create-a-rotating-wheel-control-with-uikit.
but I am not able to implement the feature as in image.
Following is the link to download the Siemens app.
http://itunes.apple.com/us/app/siemens/id452698392?mt=8

The simplest approach I can think of is to use two images. One would have the green and white detail display and one would be gray with a slight circular gradient, a lot of transparency, and a fully transparent segment.
The gray image would go on top and handle touch movement by rotating and taps according to its last stop position.

Related

Custom Shaped Buttons Unity UI

Hi I am trying to create custom buttons on unity (trapeziums). I successfully created the visible area on Photoshop and imported it as Sprite 2D UI as per the following image:
The issue arises, when I'm trying to select one of the buttons in game, their border overlap each other, since the transparent area is still being considered as part of the clickable button area. How can I remove this?
EDIT:
Practically when I import I want the squared boxes to not be counted with the image. I need the edges of the orange area to be cut flush with that and not the entire area(i.e. including the transparent boxes).
You may achieve this by using Alpha Hit Test Minimum Threshold. Take a look at this nice video tutorial.
There is one extra step that is not shown in the video but mentioned in the comments: you have to change "Mesh Type" to "Full Rect" and not "Tight" as it is.
Hope that helps.
The clickable area is based on the Rect Transform component of the GameObject. Adjust the width and height to the clickable area you want. You may have to crop your image in photoshop accordingly. If you select 'Gizmos' in the editor you can toggle viewing the click region.

detect coordinates of some element on image

Please tell me how to solve this problem.
Where to start and which way to go.
I have an image with some buttons :
How can i detect coordinates of blue round button for example?
The difficulty lies in the fact that these are not application buttons, but just a picture on the desktop.
I understand that this is a vast and complex question, but tell me at least the right way.
It will be useful to many people.
The first thing I can imagine is to do a desktop screen, and then try to detect pixels with blue color.
You don't need to do manual image detection because Apple's vision framework already does this. You can use it to detect rectangular regions, detect text, or recognize and image within an image, depending on your needs.
See Detecting Objects in Still Images

How to add effects to UILabel

I've been searching for that many time ago and I can't find a solution. I have a animated label that crosses the screen of the iPhone (like the title of a song does in the Music app.Well, I'd like to add the "fade in/out" effect like the music app has. The easy solution is open Photoshop and create this simple image and then add it up to the label. Well, under the label I have an image with black backgroud. The image can be zoomed in and then the image with the fade in/out effect can be seen, and it doesn't look well. Is there any possibility to do this programatically? Thanks
PD: if there's another possibility rather than doing this programatically, I'll apreciate the answer as well.
Edit: Here's the image capture of the problem
I'll approach it in a non-programming way.
The image reference you gave us for the Music app you seem to be emulating has a different gradient than the one you drew in the second image.
If you notice in the image, the gradient has not fully completed its transition from clear to black before the words are cut off. I would say in photoshop run the gradient from clear to 80% alpha black and then draw a 100% alpha black rectangle to finish it off as per image. The white is just showing you what it looks like without the black background.
Now as for the zooming. Correct me if I am wrong, but it sounds like you want a viewing window for the image so that once you have zoomed into it, it will fade to either side, but still be viewable/movable in the center. This means that the image has to be zoom-able, but once you have zoomed the "fade in/out" should not be zoom-able.
Just make sure you aren't scaling the fader by keeping it separate from the scrollView of your background image.

How to make a hole in an image iphone

I have a game that players place their pieces on the screen then press set. I am using cocos 2d to build the iphone app. It is kind of like hide and seek. I then overlay a background on top of all of that. I want to be able to tap on the screen and create a hole in my background at that spot so that I can see through it. I know I can just create a giant image with a hole in it and move it around, but my background can only be a color it can't be an image. How should I go about doing this.
Instead of trying to see "through" the overlay, place the "background" image on top in circles. Map the screen coordinates on top of the "background" image, then extract a circular region from that image to place on the screen. The biggest challenge would be capturing a circular region from your bitmap. I'm not too familiar with cocos2d, but there should be a library you can use for it.

How can I highlight an image on an iPhone?

I have a photo displayed on an iPhone. I would like to lower brightness of the photo at first, and when the user touches the photo, I would like to raise the brightness of the rectangular region near where the user touched, like this:
www.cottagearts.net/tut_images/tut_cropping_pse_06.jpg
Could anyone point me to a simple way of doing this?
While you can't actually adjust the brightness of the screen, you can put a semi-transparent image on the screen. I'd paint everywhere but where the user touched with an color that is black, but has X transparency, which is exactly what that image is showing that you linked to.
I'm no expert, but I've been trying to do something similar. You could implement this with layers. As Malfist suggested, you could make a black layer with a certain opacity and may the clicked part of it fully transparent or somesuch. Another option would be to do some image processing. I found an article here that I think will handle my highlighting issue:
http://arstechnica.com/apple/news/2009/03/iphone-dev-basic-image-processing-package.ars