GitXplorerGitXplorer
m

PromotionTwoScreensInOne-Example

public
9 stars
3 forks
1 issues

Commits

List of commits on branch master.
Unverified
3e6349d1df4c2fe6b66c41696014bc6b7d076580

Merge pull request #1 from jamonholmgren/master

mmarkrickert committed 10 years ago
Unverified
fad57ba81b5130083389146c6ad022e72f357ec1

Avoid cyclical reference memory leak

jjamonholmgren committed 11 years ago
Unverified
78ea6ed81a58ac6ce7e999a067473d8491d06487

Update README.md

mmarkrickert committed 11 years ago
Unverified
4578f45f9659434273ae35d16ed814f2d8cec448

Updated project for Promotion > 2

mmarkrickert committed 11 years ago
Unverified
db64175b6f8d2a6dbb25bf9adadc9b84f3107047

General updates. Fixes zoom being too close.

mmarkrickert committed 11 years ago
Unverified
15069f7c72d7b32523848c0716113d57281d98e9

Make sure we can't go into portrait orientation.

mmarkrickert committed 11 years ago

README

The README file for this repository.

PromotionTwoScreensInOne-Example

Summary

An example Promotion (RubyMotion) application that shows how to use two PM::Screen instances in a master screen and communicate between them.

More in depth

This example uses ProMotion. We create one PM::Screen and initialize two other PM::Screen subclasses and set all their attributes. Then when we lay out the the main view controller, we add the two PM::Screen's respective views to the main screen.

This app is a map with a tableview under it that lists out all the states. You can tap a state and the map will animate and zoom to encompass the entire state. This app also showcases Apple's reverse geocoding api very nicely since I'll I'm doing to get the map coordinates and region is asking Apple where "State, USA" is and it returns back all the relevant data for me to use.

Making the screens talk to each other

You can see how I'm passing messages from the PM::TableScreen to the PM::MapScreen using the attr_accessor :container to pass in self and therefore allow messages to be easily sent to the main view controller to manupilate both screens.

Screenshots

Screenshot 1

Screenshot 2