I got a project ( I' ve already finished it ) I did a uialert view into. When I started my app and pressed the alert view button, the alert view came from the top, not from the middle of the screen. I set the view s origin s to the middle, and it s worked, but if went into a subview and after backed to the start view, the alert view came again from the top left.
Then I set my view s origin back to the top left, and it s still works the same wrong mode( app start: okey, after go into subview and back it s wrong) .
If I start my app,and just tap the alert button it works fine ( appears from the middle with the right animation ), after I go any subview , it s confuse, and I got a uitextfield, and map too in my subviews. If I click into the textfield, the "|" symbol to start writing, comes from the top left, and if I want to zoom in my text for just correct it, the loupe comes from the top left too, and it s really annoying. And if I watch the map, and there is a pin, and during the zooming in or out the pin disappears, when I stop it, it comes from the top left, or bottom right.
I don t know how to fix this problem, my mind is blowing.
I tried to fix it with code:
skroller.layer.anchorPoint = CGPointMake(0.5, 0.5);
levels.layer.anchorPoint = CGPointMake(0.5, 0.5);
but it still works wrong
If I click on the view , and show the size inspector it doesn t look like this:
image
I don t see the Autosize, and example, and arrange. If I click on for example to attributes inspector it appeard for 0.00001 sec .
Related
Hi I want to create a layer of the type in the image below.
The layer (with Capture mode and Shutter speed) slides up when I click on the setting button.
I am unable to figure out what should I do do create something like this. Also want to have the similar translucency in the layer as well as in the buttons on it also.
On click on the same button again, the layer(with Capture mode and Shutter speed) disappears, leaving what was there on the screen before (the camera view and the lower bar with the camera capture button, and the two setting buttons)
Please any suggestions are much appreciated.
Thanks
Maybe you can create a UIView and place every button you need there, and place it below the screen size. then when you click the setting button you call core animation to move the view up, click setting again to move it down.
I've ran into a weird issue lately:
I have a 320 x640 UIView within a UIScrollView. I've manually positioned buttons throughout the view and assigned actions to them. One of the buttons has a center at [x,y]: [287,440]. The button is 60x60.
I can tap all other buttons and controls located as low as Y = 353.
I see that the button is located on the same level as all of my other buttons, within the same view as them.
What could be causing my button to be completely untappable? I have another controller, which is also "tall", and there buttons located "off screen" are tappable. [If I move the button up to the level of other buttons, it works as expected.]
Here's the scroll view code:
self.scrollView.contentSize=CGSizeMake(320, 640);
Something is covering it. Try looping over all subviews and printing origin.y relative to scrollview origin.y, and then height plus relative position. Do this in viewWillAppear. Be aware that autoresizing behavior can kick in right after viewDidLoad and fool you. That is what happened to me earlier. There will be an overlap somewhere.
Can post code example later from home if this doesn't get you through it.
I've changed my UITableView to be grouped in Interface Builder (which looks so much nicer!), but now the Disclosure Indicator against my UITableView row moves a few pixels up and right whenever I press my edit button in my navigation bar (at the same time as the red delete buttons move in)!
Has anyone seen this before or got any suggestions?
Edit:
Ive added a screen shot to this question. While it is very hard to notice even on these large screen shots, the chevron in the upper right corner of the second picture is a few pixels up and right of the chevron on the first picture. This is obviously more apparent when it moves in front of your eyes. On the second picture, the edit button has been pressed (which you can tell, because the delete icon has appeared)
Hope someone can help me out here.
I have a viewcontroller with view that contains a red image. This image has a zPosition of 1.
There a function I press and it adds a new view on top of this (and viewcontroller). that places a button on top of the red bar with a zPosition of 2.
Then when you press the button, a 3rd view (and controller) slides up a menu behind both of them (image and button) as it has a zPosition of 0.
Now the issue is that the menu slides up under the red bar as expected however for some unknown reason (why I am here) the button seems to be under the red image. What every I try, I cant get the button to sit on top of the image.
I have tried:
propertyViewController.shortlistButton.layer.zPosition = 2;
[propertyViewController.view bringSubviewToFront:propertyViewController.shortlistButton];
propertyViewController.shortlistButton.layer.transform = CATransform3DMakeTranslation(1, 1, 1);
(stackoverflow post)
You could simply try adding the red button as a subview of red image.
How to show a small pop up on click of button on a view that will be displayed in small region of the parent view.
You can simply define the frame for your view, and add it as a subview of its parent.
newView.frame = CGRectMake(60, 140, 200, 200);
[parentView addSubview:newView];
Just putting up a view is pretty straightforward (create a UIView, position it, then addSubview it to the parent). But there are a few UI design questions you may want to ask yourself before you pop something up. Things like:
Is the pop-up modal? Once it's up can the user do something else or do they have to 'dismiss' the view before continuing.
How does the user dismiss the view? Do they tap the view itself, some sort of 'close' object, or tap outside of it?
Where do you position the pop-up view if you're too close to the side of the window (otherwise it gets clipped and the user can't see all of it).
Should you offset it from the button itself so the tapping finger isn't covering up the item? How many pixels work best? And does the offsetting bring the view too close to the edge, so maybe show it on the other side so it's not clipped?
And they say UI design is easy ;-)