uiview zorder when using CATransform3DMakeRotation - ios

the situation is as follow: the self.view contains:1, a custom bar which is actually a uiview with some buttons on it and its height is 44px
2, a uitable view y-pos starts at 44th px. the rows have 150px tall and wide button. on touching the button, a tmp uiview with similar look to the button added on the table at same position where button is. some animation block happens and uiview covers the whole table and shows some content.
so far all is fine.
now if one scrolls the table up so that bottom half is visible and the top half is invisible.
the tmp view gets added properly at the same location but while using CATransform3DMakeRotation(M_PI_2, 0.0f, 1.0f, 0.0f) the left half looks on the top of the custom bar even though the tmp view added using insertSubview belowSubview:customBar.
i tried to send the view to back but no luck.
so any idea how to resolve this issue?

that was very easy. the view which should be on the top of all even during flipping should have a large positive zposition value before applying the animation.
self.myview.layer.zPosition =200.0f;

Related

Gap between top of UIScrollView and adjoining view

I'm trying to figure out why there's a gap between my scroll view (topped by the pink) and the upper view (black).
I have created this in interface builder. The pink view is inside a UIScrollView that is set to have its top == bottom of the black view above it:
Why is there this gap and how can I stop it?
Here is a slice of the entire screen to give you an idea:
I am having the same difficulty both at the top and bottom of the scroll view. There is a white gap between the top view of the scroll view and the next view up, and similarly there is a gap at the bottom view for the scroll view and the bottom of the screen. I tried turning off 'bounces enabled' but that has not fixed the problem. What gives?

Autolayout position reset

I have a View and i have a an image view inside it and a another UiView and one or two more view in side the top level view. The problem is when i run my app in different screens iphone the image view resizes and i want the other view to change the their position to a little bit down. But only image view gets more space, but i don't want the other view to get more space but i want them to change their position.
Here i want the white view the Placeholder text and the the small picture view to change their position and go a bit down when the app runs on big screen iphone. Th rounded image view above the Mybutton gets more space when the screen resizes which is okay but the white view and other view remain at their same place. Just to add more information all these view are siblings of each other and i have fixed the the width and height of the white view, picture view and the placeholder text label
Any guidance please?
I think you have to start with the "movable" element and then add every "fixed" element.
I think you have to work with Center Y Alignment Contraint even if you have to create new view for it. The beginning could be :

GLKView frame size animation causes GL to render only a portion of the screen

I have a GLKView contained in a UIView under a top, nav-like bar. The bar can be shown/hidden with an animation and the autolayout pinning causes the views to fill the portion of the screen under the bar (or the full screen if hidden).
What's odd is that when the top bar begins its show/hide animation, the GLKView immediately jumps to the final height. When showing the top bar (which shrinks the GLKView), it causes clear band to be seen on the top and bottom.
What's also odd is that the view's position seems to work correctly, and animates smoothly down as the top bar comes down until they all eventually line up as they should.
Dumping out out the GLKView's layer.presentationLayer property seems to indicate that it's bounds animates correctly.
The GLK-ness of the view could be a red-herring as I haven't tested this on other parts of the app...will do though...
Very confused. Sorry no photos but it's all NDA and I've no time to make a sample project right now. Maybe later if need be. Thanks...

How do I make a button slide to reveal like the UITableView delete confirmation button?

I would like to re-create the animation of the delete confirmation button that Apple uses in the default implementation of UITableView. I want to create this button and animation in my own custom view area, but haven't been successful in finding a proper view transition or animation. Here is a picture of the reveal animation half way through:
And here is a picture of the animation after it has finished:
These are screenshots from a YouTube video that shows how the button animation is supposed to look.
Thanks!
Basically,
1) Put a button inside a view of the same size as the button, with the autoresizing masks of the button set to force it to not shrink when the view changes size, and have a left flexible margin.
2) Animate the view's frame to change from 0 width to full width while moving from x origin to (x - view width) origin.
As the view grows the button will be revealed. The view should have clipToBounds set to yes.

iOS : How to create a close button that sits on the edge of a UIView with rounded corners (using IB)?

Background:
I am working on an iPad app that will pop a custom view when the user clicks on an image.
I want the view to have rounded corners and a close button ( red x in a circle ) that sits on right top edge.
The button in half inside and half outside the view.... Take a look at the Kayak or Zynga Poker apps to see what I am talking about.
Question : If I create the view programmatically and add the button, it works.
However, I really want to user a nib to create the view so I can design the view correctly. So when I call self.layer.maskToBounds = YES on the view ( to create the rounded corners with a radius of 25 ), it clips my button ( since its half in and half out ). How do I retain my button without it getting clipped and still have rounded corners ?
Sounds to me like you are using a view and a button. What you might try is using a third container view (with clear background) in which you place your original view and your button. The button will need to be on top of the view, so to speak, so it is not obscured by your view. But that should allow you to have properly rounded corners on your view (not the container view) and have your button fully visible.
Some settings, such as maskToBounds, cornerRadius, aren't available in IB. You can create the entire view using a NIB except it won't have rounded corners in IB and in viewDidLoad you set just those properties that couldn't be set in IB.

Resources