I want to animate the visibility property of a view so that it appears/disappears smoothly.
How can i achieve that?
if you want to animate the Alpha value than you should look at AlphaAnimation
see link below for more help:
Android Animation
Related
I would like it to appear the keyboard is pushing another view up. The problem is there is a UITabbar between the UIView I would like to animate in unison with the keyboard, problem being the UITabbar breaks up what would give that appearance. What I would really like to be able to do is detect when the keyboard is at the exact point my view then animate that view.
Is this possible without going into the private API's?
Too be clear I have the animation working, just working out a way to make it smoother. The effect I am trying to create is similar to the messages app, but there is a UITabbar between to UIView and the bottom of the screen.
Perhaps this will work...
The height of the keyboard on the iPhone is 216 pixels. The default animation duration for the keyboard display is 0.25 seconds.
The height for a tab bar is 44 pixels.
So, if you started the UIView transition animation afterDelay:((44.0/216.0) * 0.25), this should look right on an iPhone. Perhaps try and see?
If this works, it's pretty easy how to figure out for landscape, and iPad, etc.
Additionally, if this does work, in your final implementation, I would avoid hardcoding the 0.25.
I have bunch of images inside a UIScrollView and have a tap event setup on each image. When I try to make the image full screen it actually is cut off by the scroll view. I am trying to implement a Facebook style UIImageView where the image zoom in and takes over the full screen on tap.
Does anyone have suggestion on how to approach this cause the way I am doing the image is cropped to the size of the scroll view.
Well, usually you would disable clipping, but the scrollview relies on clipping to do its job so that won't work.
My suggestion would be to push a copy of the image above the scrollview, and animate that to full screen. You should be able to get the rect using convertRect:toView: and it would be pretty straightforward from there.
btw, Is there a reason not to use a tableView for this?
When tapped hide the image and add the image at the proper place in the scrollview superview and over the scrollview. Then animate it to take the full screen.
Facebook App style UIImageView is nicely implemented in below given source code, you can take a clue from this
https://github.com/michaelhenry/MHFacebookImageViewer
I am trying to create the same type of slide-up/pull-up menu (from the bottom) as the Any.do iPhone app, but not having any success.
The issue I am running into is the app was built with storyboards so I am thinking I might have to scratch that idea and use just code.
Any ideas?
There is no need to get rid of your storyboard to recreate this, that's what IBOutlets are for. Any way, it looks like this was made by creating a UIScrollView that takes up the entire screen. Then add a UITableView to the upper section of the scroll view. Mind you in order for this to work, you'll need to disable scrolling on the scroll view in the background.
From there you can programmatically add the other elements to the scroll view to be rendered off screen, since there are only three they can probably just be buttons. And finally, since scrolling is disabled on the background scroll view you can add an image with a UISwipeGestureRecognizer at the bottom of the screen to manually change the scroll view's content offset property.
I've seen many apps creating a side bar on the left like the image above. Apparently this is not a split view controller since the size is fix for that.
Anyone know how to do it? May I get some directions or advice on this?
It is shown in this tutorial, how you can implement that kind of "custom side Tab Bar", he did a video about it too.
That can be done simply by adding to your main view a UIView with a "vertical" frame, e.g. (0, 0, 44, screenHeight). That view should be then populated with all the icons you need...
There is nothing more to it, as far as I can see.
You can't use the default UITabBarController from iOS. You will need to do your custom tab bar. You could use an UIView with some UIButtons added as subviews.
I want to customize my button like those UIBarButtonItems on a UIToolbar with tint color. Does any one know how to draw that tint effect?
I went nuts trying to figure this out once.
The best I could do was to do my own "custom" button, and use it as the button's "image".
The real hard part was getting the font right. The web said it was supposed to be "Helvetica" I believe - but it never looked right.
The thing you're trying to do isn't supported. You should just make your own button that looks the way you want it to and set it as the customView of the button item object.