Slide view while touching button - IOS - ios5

I'm trying to implement a view that includes social buttons.In normal state, it will be partially hide and only the "Opciones" button and the upper line is shown. This view will be shown when user touches button "Opciones" (touch gesture), then it will unhide and be shown using sliding effect until the final position that is included in the attached image.
I'm wondering which kind of control and animation I have to use.
Many thanks.

Related

How to create a message box when user press on an image in swift ?

I am trying to do something like this picture.
https://i.stack.imgur.com/5JneD.png
So when a user press at a specific area in a box, a button or a message tag will appear.
Any idea where should I start from? I was able to create the box, just need when the user press a tag appears.
Add a UIImageView to your view controller. Set isUserInteractionEnabled to true for the image view. Attach a UITapGestureRecognizer to the image view.
In the handler for the tap gesture recognizer's tap handler, call location(in:) to get the coordinates of the tap in the image view's coordinate system.
Use the CGRect function contains(_:) to determine if the tap point is inside either of those areas.
Note that alternately you could simply add transparent buttons on top of your image view at the desired locations and use target/actions on those buttons to respond to the taps.

How to create a translucent layer on click of button, which would slide up for iphone

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.

How to pull a view from one corner of the app?

I would like to create view that could be pulled from one corner to take full screen (like the iphone status bar that can be pulled from top).
Could you just give me an idea how to accomplish that.
Thanks
Put a small view into the corner of the screen that acts as your handle.
Add a UIPanGestureRecognizer to that view.
When the gesture recognizer's action method gets called, move the handle and the view you want to present according to the movement of the user's finger.
When the gesture ends (because the user has lifted their finger off the screen), decide whether the movement was large enough to bring in the new view or not (e.g. if the user dragged the view over >30% of the screen, you move it in, otherwise you move it back out).
Animate the view into its final position.

floating button above UIScrollView in Storyboard

Is there an easy way of putting a 'floating' button above a UIScrollView in Storyboard? I would like to add a lock button to toggle scrolling on and off. I guess I could do this in code but it would be nice if it could also be done via XCode.
Just drag the button onto the view somewhere over your UIScrollView. Now, IB will automatically dump it in the scroll view, but you can move it out by using the object browser.
Open the object browser
Drag the button out to the same level as the UIScrollView
Ensure that the button is below the scroll view in the list (this means it's above the object in the view hierarchy)
You may have to use the inspector to set the button's actual location rather than dragging it around. Dragging it around for placement will most likely cause it to jump back into the scroll view.

custom slide to reveal toolbar

i want to do a custom toolbar, something like the slide to unlock of android phones. In idle state, the user can see a button of the bottom left of the page. the user would then tap it, drag towards the right. When the user reaches the right end, the toolbar will then 'lock'. Buttons would be located at the toolbar.
I'm think of using a customview and touchmoved functions, but what I don't know how is how to make the view move with the touch, and how to actually lock the bar.
Everytime you move your finger the touchmoved function is called. In the touchmoved function you have to redraw the whole view or just set a new frame for this view. It pretty simple as you already know how to detect touches and react on them.