Create animations like an app for iOS 8 Weather

I want to create a view in which I like to have animations, such as the one that is present in the iOS 8 Weather app. I am trying to explain more what I have done. If something is wrong, please help me.

  • At the top, I put a label for the temperature. (Big)
  • Below this label, I put another label to show some text. The Weather app has a horizontal scroll showing the hourly forecast.
  • The following is a table view.

What I want to achieve is that when I start scrolling, the first shortcut disappears smoothly, and the second - at the top of the screen, and the TableView stretches to show more content. When I go back, I want the whole process to come back.

What is the best way to do this?

+4
source share
1 answer

I recently updated the scroll effect of the iOS8 Weather app for the app I am creating.

The full code is too long to post here, but for anyone interested, I put it on GitHub. You can download and run the project to see how it looks. Code enhancements are welcome:

UIScrollView with masked content .

It works as follows:

  • You have one scrollview (screen size) that contains a preview (mask), which in turn has subview (content). We also add a large mark at the top of the screen (in the Weather app this displays the temperature).

  • scrollViewDidScroll, . , .

  • , ( ) . , , , ( , scrollViewDidScroll).

  • , , clipsToBounds = YES .

  • , scrollview .

, iOS8 Weather, :

  • , , .. .
  • , , , , .
  • , .

.

+6

All Articles