ios-samples/StateRestoration
conceptdev b2b8e2ebb1 update header yaml 2019-07-29 19:48:37 -07:00
..
Screenshots [StateRestoration] moved classic version of StateRestoration sample 2014-11-06 20:30:54 +03:00
StateRestoration Switched to 64-bit only builds. 2018-08-07 14:13:47 +01:00
LICENSE.txt [StateRestoration] Add license 2016-02-18 22:15:27 -03:00
Metadata.xml Shorten brief descriptions 2015-04-23 16:04:21 -04:00
README.md update header yaml 2019-07-29 19:48:37 -07:00
StateRestoration.sln [StateRestoration] moved classic version of StateRestoration sample 2014-11-06 20:30:54 +03:00

README.md

name description page_type languages products extensions urlFragment
Xamarin.iOS - StateRestoration Demonstrates how to use UICollectionView, a way to present ordered data to users in a grid-like fashion (UI) sample
csharp
xamarin
tags
ui
staterestoration

StateRestoration

Demonstrates how to use UICollectionView, a way to present ordered data to users in a grid-like fashion. With a collection view object, you are able to define the presentation and arrangement of embedded views. The collection view class works closely with an accompanying layout object to define the placement of individual data items. In this example UIKit provides a standard flow-based layout object that you can use to implement multi-column grids containing items of a standard size.

StateRestoration application screenshot

This application also demonstrates the use of Application State Restoration features introduced in iOS 7. If the application exits, it will restore the previous state the next time it starts.

(Note that if you quit the application from the App Switcher, it will not restore state on the next launch, so for testing, exit the application from Xamarin Studio.)

To manipulate images, select one from the collection view, then you can do the following:

Single tap will hide/show the Navigation/Tool/StatusBar Pinch and Zoom with two fingers resizes the image Double tap alternates between zoom and normal size for the image The Blur and Sepia buttons on the bottom right present a filter controller to manipulate the image.

In this example, the following state is saved and restored:

  • CollectionView scroll position.
  • Selected cell in CollectionView.
  • Displayed Image.
  • CGAffineTransform for displayed image
  • Visible/Hidden state of Navigation/Tool/StatusBar when image is showing
  • Filter settings for image

Additionally, if the Mail Activity is selected, to compose Mail, that will be saved and restored.

Build Requirements

Building this sample requires Xcode 5.0 and iOS 7.0 SDK

Target

This sample runnable on iPhoneSimulator or iPhone

License

Xamarin port changes are released under the MIT license