I want to achieve the same kind of flipping card animation for iOS application which Windows Phone 7 has.
While navigating from one page to another, it loads one by one widget with fall down from left to right position.
How to achieve the same animation for iOS?
Here is the reference: http://www.youtube.com/watch?v=cVRT_KbYzHI
Please help out with some sample code posting or another provided link.
You can achieve animations such as this with UIView's animateWithDuration:delay:options:animations:completion: method. The documentation is here; search for the function name: http://developer.apple.com/library/ios/#documentation/uikit/reference/uiview_class/uiview/uiview.html
Basically you would need to place the views you want to animate inside a loop, incrementing the delay by x amount each time.
Related
I am currently developing a weather app.
For now I have just implemented static background image on the Home page that vary depending on the current weather.
I would like to improve this feature in order to provide a better user experience.
I think that with the rapid growth of technology, hardware, wifi but even frameworks and developing tools we are able to make greater and greater Apps each days.
That's why I am really interested about knowing different ways to improve my App.
Moreover, I think that the proper/coolest way to differentiate my App from the weather-app market is to have unique features or at least "more enjoyable" than others.
I really don't know where to start, I have read 3 different posts on StackOverflow about animated background without success.
I would like to know which solution is better in order to implement animated background image.
Should I play a short video infinitely, like a GIF ?
In term of battery consumption, should I worry about that ? Even knowing that the average app-navigation time for a weather app is approximatively 47s.
PS: I am developing with Objective C.
If you have any suggestions, any informations, I'll take it.
Thank you in advance.
There is a way to create a continuously animated image. What you do is create a UIImage with a special initializer (see final line). You give this initializer the base name of an image, like “storm”. The understanding is that you will have several files named storm1.png, storm2.png, etc., the succession of which will constitute an animation. All you do is call the initializer and specify how long you’d like each animation frame to last, and all the rest is automatic. The image view that gets created will continue cycling through however many animation frames you have. As long as that image view is visible, Apple’s code will guarantee the image will be continuously animating. As soon as it gets to the end of the list (say, storm8 if you have 8 frames in your animation), it automatically starts over. At least in Swift, you don’t even have to tell it the file extension of the images.
If you want the image to cover the entire background of your view controller, just set up the imageView in Interface Builder to be pinned to the left, right, top, and bottom of the main view of your view controller.
Here’s the syntax for creating the continuously animated image in your code:
UIImage *image = [UIImage animatedImageNamed:#"storm.jpg" duration:0.5f];
Or in Swift:
let imageView.image = UIImage.animatedImageNamed("storm", duration: 0.5)
I downloaded the latest iOS package from vidyo.io and have successfully built my application integrated with the Vidyo libraries and using the VidyoConnector API.
When my app first comes up, I was very happy to see that a preview video appears on the screen just where I’d expect it to be! However, when moving the view to a different location, the video did not render quite how I intended.
The video did move to the x/y position on screen that I’d hoped but the size did not adjust to my new view dimensions. Then I found the VidyoConnectorShowViewAt API call and that did indeed resize my view but the positioning of the video then was off.
Is this the correct call to make when moving and resizing a view? Does anybody have any ideas what I could be doing wrong? Any help would be appreciated.
Sounds like you are pretty close. If you are just moving your view to different coordinates without resizing, then no API call is necessary. But if also resizing, then indeed use VidyoConnectorShowViewAt. My hunch is that your coordinates that you are passing are off, as x and y should be relative to the view itself and not to the main view. So try passing 0 and 0 as x and y and see if that helps.
I am making a single view application in Xcode and I am having a little trouble*(By little I mean BIG trouble!)
I wanted to make a clone of the Apple's News app home page where the buttons are are blurry than come to focus.I want to use that effect for three different ui elements.I have been trying for days but no success. :(
Is there a way of doing the blur than focus animation to a label a button And image view? If so can you please guide me on how to do it?
Thank you for your time.
I would like to know when the screen is being drawn on iOS. In particular, I'd like to know if there are any visible changes being drawn on screen. This can be handy to know how long a page took to render, for example (assuming that the user is not interacting with the page). I would like to be able to capture this information in a regular production build, not in a developer build. And I'd like this to be a general solution applicable to most any page in my app, not just a specific page.
For example, I have a page that 1) asynchronously queries an API for data, 2) displays that data in a UITableView where some of the entries may be offscreen, and then 3) asynchronously downloads the images for each of the visible items on the screen. I want to get callbacks when the UITableView is rendered and when all of the images are rendered. The total time to render the page can be determined by looking at the timestamp of the last call to the callback (again, assuming no user interaction).
On Android, this is fairly simple. You can use ViewTreeObserver.addPreDrawListener to get a callback whenever the screen is being drawn. If there's no visible change to the screen, the callback is not called.
On iOS, it looks like CADisplayLink might potentially serve a similar purpose. However, when I hook up my CADisplayLink, it appears to be called over-and-over forever, whether or not there are visible changes on the screen.
Is there a way to know when there are visible changes to the screen being drawn in iOS?
In iOS 9 Apple made it impossible to get access to things drawn onto the screen outside of your app. Prior, it was possible to use an API called IOSurface to do it, but Apple closed it down in iOS 9. (To prevent apps from snooping on each other.)
So if you're talking about ANYTHING being drawn to the screen the answer is no. If you're looking for changes within your app there's probably a way to do it.
In the latest Expedia app for iOS, they have a very interesting effect that I am trying to wrap my head around.
When you tap on any tile it flip and zoom animation.
Can you please help me for the same for UIView transition.
I've wanted to use this kind of animations in my app as well, so I have written a simple custom segue that does just that - you can even choose between multiple types of flips!
It's called IBCellFlipSegue, give it a try and let me know what you think!
https://github.com/IBLabs/IBCellFlipSegue