diff --git a/examples/ios/iosNativeARCExample/addons.make b/examples/ios/iosNativeARCExample/addons.make deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/examples/ios/iosNativeARCExample/bin/data/fonts/frabk.ttf b/examples/ios/iosNativeARCExample/bin/data/fonts/frabk.ttf deleted file mode 100644 index 21c4ecfc553..00000000000 Binary files a/examples/ios/iosNativeARCExample/bin/data/fonts/frabk.ttf and /dev/null differ diff --git a/examples/ios/iosNativeARCExample/bin/data/fonts/mono0755.ttf b/examples/ios/iosNativeARCExample/bin/data/fonts/mono0755.ttf deleted file mode 100644 index ffee24f3670..00000000000 Binary files a/examples/ios/iosNativeARCExample/bin/data/fonts/mono0755.ttf and /dev/null differ diff --git a/examples/ios/iosNativeARCExample/bin/data/images/dive.jpg b/examples/ios/iosNativeARCExample/bin/data/images/dive.jpg deleted file mode 100644 index a47a3b1f277..00000000000 Binary files a/examples/ios/iosNativeARCExample/bin/data/images/dive.jpg and /dev/null differ diff --git a/examples/ios/iosNativeARCExample/src/AppViewControllers/CircleAppViewController.h b/examples/ios/iosNativeARCExample/src/AppViewControllers/CircleAppViewController.h deleted file mode 100644 index 31743cad7ff..00000000000 --- a/examples/ios/iosNativeARCExample/src/AppViewControllers/CircleAppViewController.h +++ /dev/null @@ -1,10 +0,0 @@ -// -// CustomAppViewController.h -// Created by lukasz karluk on 8/02/12. -// - -#import "ofxiOSViewController.h" - -@interface CircleAppViewController : ofxiOSViewController - -@end diff --git a/examples/ios/iosNativeARCExample/src/AppViewControllers/CircleAppViewController.mm b/examples/ios/iosNativeARCExample/src/AppViewControllers/CircleAppViewController.mm deleted file mode 100644 index aaa782cf1eb..00000000000 --- a/examples/ios/iosNativeARCExample/src/AppViewControllers/CircleAppViewController.mm +++ /dev/null @@ -1,23 +0,0 @@ -// -// CustomAppViewController.m -// Created by lukasz karluk on 8/02/12. -// - -#import "CircleAppViewController.h" -#import "ofxiOSExtras.h" -#import "ofAppiOSWindow.h" - -@implementation CircleAppViewController - -- (id) initWithFrame:(CGRect)frame app:(ofxiOSApp *)app { - - ofxiOSGetOFWindow()->setOrientation( OF_ORIENTATION_DEFAULT ); //-- default portait orientation. - - return self = [super initWithFrame:frame app:app]; -} - -- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { - return NO; -} - -@end diff --git a/examples/ios/iosNativeARCExample/src/AppViewControllers/ImageAppViewController.h b/examples/ios/iosNativeARCExample/src/AppViewControllers/ImageAppViewController.h deleted file mode 100644 index 4f5e154a301..00000000000 --- a/examples/ios/iosNativeARCExample/src/AppViewControllers/ImageAppViewController.h +++ /dev/null @@ -1,10 +0,0 @@ -// -// CustomAppViewController.h -// Created by lukasz karluk on 8/02/12. -// - -#import "ofxiOSViewController.h" - -@interface ImageAppViewController : ofxiOSViewController - -@end diff --git a/examples/ios/iosNativeARCExample/src/AppViewControllers/ImageAppViewController.mm b/examples/ios/iosNativeARCExample/src/AppViewControllers/ImageAppViewController.mm deleted file mode 100644 index 8450a471ce8..00000000000 --- a/examples/ios/iosNativeARCExample/src/AppViewControllers/ImageAppViewController.mm +++ /dev/null @@ -1,23 +0,0 @@ -// -// CustomAppViewController.m -// Created by lukasz karluk on 8/02/12. -// - -#import "ImageAppViewController.h" -#import "ofxiOSExtras.h" -#import "ofAppiOSWindow.h" - -@implementation ImageAppViewController - -- (id) initWithFrame:(CGRect)frame app:(ofxiOSApp *)app { - - ofxiOSGetOFWindow()->setOrientation( OF_ORIENTATION_DEFAULT ); //-- default portait orientation. - - return self = [super initWithFrame:frame app:app]; -} - -- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { - return NO; -} - -@end diff --git a/examples/ios/iosNativeARCExample/src/AppViewControllers/SquareAppViewController.h b/examples/ios/iosNativeARCExample/src/AppViewControllers/SquareAppViewController.h deleted file mode 100644 index 8de3369476c..00000000000 --- a/examples/ios/iosNativeARCExample/src/AppViewControllers/SquareAppViewController.h +++ /dev/null @@ -1,10 +0,0 @@ -// -// CustomAppViewController.h -// Created by lukasz karluk on 8/02/12. -// - -#import "ofxiOSViewController.h" - -@interface SquareAppViewController : ofxiOSViewController - -@end diff --git a/examples/ios/iosNativeARCExample/src/AppViewControllers/SquareAppViewController.mm b/examples/ios/iosNativeARCExample/src/AppViewControllers/SquareAppViewController.mm deleted file mode 100644 index 4620a1e71a7..00000000000 --- a/examples/ios/iosNativeARCExample/src/AppViewControllers/SquareAppViewController.mm +++ /dev/null @@ -1,23 +0,0 @@ -// -// CustomAppViewController.m -// Created by lukasz karluk on 8/02/12. -// - -#import "SquareAppViewController.h" -#import "ofxiOSExtras.h" -#import "ofAppiOSWindow.h" - -@implementation SquareAppViewController - -- (id) initWithFrame:(CGRect)frame app:(ofxiOSApp *)app { - - ofxiOSGetOFWindow()->setOrientation( OF_ORIENTATION_DEFAULT ); //-- default portait orientation. - - return self = [super initWithFrame:frame app:app]; -} - -- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { - return NO; -} - -@end diff --git a/examples/ios/iosNativeARCExample/src/AppViewControllers/TriangleAppViewController.h b/examples/ios/iosNativeARCExample/src/AppViewControllers/TriangleAppViewController.h deleted file mode 100644 index e2f45110250..00000000000 --- a/examples/ios/iosNativeARCExample/src/AppViewControllers/TriangleAppViewController.h +++ /dev/null @@ -1,10 +0,0 @@ -// -// CustomAppViewController.h -// Created by lukasz karluk on 8/02/12. -// - -#import "ofxiOSViewController.h" - -@interface TriangleAppViewController : ofxiOSViewController - -@end diff --git a/examples/ios/iosNativeARCExample/src/AppViewControllers/TriangleAppViewController.mm b/examples/ios/iosNativeARCExample/src/AppViewControllers/TriangleAppViewController.mm deleted file mode 100644 index 3ce2f172ce0..00000000000 --- a/examples/ios/iosNativeARCExample/src/AppViewControllers/TriangleAppViewController.mm +++ /dev/null @@ -1,23 +0,0 @@ -// -// CustomAppViewController.m -// Created by lukasz karluk on 8/02/12. -// - -#import "TriangleAppViewController.h" -#import "ofxiOSExtras.h" -#import "ofAppiOSWindow.h" - -@implementation TriangleAppViewController - -- (id) initWithFrame:(CGRect)frame app:(ofxiOSApp *)app { - - ofxiOSGetOFWindow()->setOrientation( OF_ORIENTATION_DEFAULT ); //-- default portait orientation. - - return self = [super initWithFrame:frame app:app]; -} - -- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { - return NO; -} - -@end diff --git a/examples/ios/iosNativeARCExample/src/Apps/CircleApp.h b/examples/ios/iosNativeARCExample/src/Apps/CircleApp.h deleted file mode 100644 index 573e0349554..00000000000 --- a/examples/ios/iosNativeARCExample/src/Apps/CircleApp.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -#include "ofxiOS.h" - -class CircleApp : public ofxiOSApp { - -public: - - CircleApp (); - ~CircleApp (); - - void setup(); - void update(); - void draw(); - void exit(); - - void touchDown(ofTouchEventArgs &touch); - void touchMoved(ofTouchEventArgs &touch); - void touchUp(ofTouchEventArgs &touch); - void touchDoubleTap(ofTouchEventArgs &touch); - void touchCancelled(ofTouchEventArgs &touch); - - void lostFocus(); - void gotFocus(); - void gotMemoryWarning(); - void deviceOrientationChanged(int newOrientation); - - ofTrueTypeFont font; - -}; - - diff --git a/examples/ios/iosNativeARCExample/src/Apps/CircleApp.mm b/examples/ios/iosNativeARCExample/src/Apps/CircleApp.mm deleted file mode 100644 index 7d301e05f75..00000000000 --- a/examples/ios/iosNativeARCExample/src/Apps/CircleApp.mm +++ /dev/null @@ -1,117 +0,0 @@ -#include "CircleApp.h" - -//-------------------------------------------------------------- -CircleApp :: CircleApp () { - cout << "creating CircleApp" << endl; - //add this to listen to orientation events etc. - ofxiOSAlerts.addListener(this); -} - -//-------------------------------------------------------------- -CircleApp :: ~CircleApp () { - cout << "destroying CircleApp" << endl; - //add this to listen to orientation events etc. - ofxiOSAlerts.removeListener(this); -} - -//-------------------------------------------------------------- -void CircleApp::setup() { - ofBackground(127); - - int fontSize = 8; - if (ofxiOSGetOFWindow()-> isRetinaSupportedOnDevice()) - fontSize *= 2; - - font.load("fonts/frabk.ttf", fontSize); - -} - -//-------------------------------------------------------------- -void CircleApp::update(){ - -} - -//-------------------------------------------------------------- -void CircleApp::draw() { - int x = ofGetWidth() * 0.5; - int y = ofGetHeight() * 0.5; - int r = MIN(ofGetWidth(), ofGetHeight()) * 0.3; - int p = 0; - - ofSetColor(ofColor::red); - ofDrawCircle(x, y, r); - - x = ofGetWidth() * 0.2; - y = ofGetHeight() * 0.11; - p = ofGetHeight() * 0.035; - - ofSetColor(ofColor::white); - font.drawString("frame num = " + ofToString(ofGetFrameNum() ), x, y+=p); - font.drawString("frame rate = " + ofToString(ofGetFrameRate() ), x, y+=p); - font.drawString("screen width = " + ofToString(ofGetWidth() ), x, y+=p); - font.drawString("screen height = " + ofToString(ofGetHeight() ), x, y+=p); -} - -//-------------------------------------------------------------- -void CircleApp::exit() { - // -} - -//-------------------------------------------------------------- -void CircleApp::touchDown(ofTouchEventArgs &touch){ - int orient = ofGetOrientation(); - if(orient<4){ - orient++; - }else{ - orient = 1; - } - ofSetOrientation((ofOrientation)orient); -} - -//-------------------------------------------------------------- -void CircleApp::touchMoved(ofTouchEventArgs &touch){ - -} - -//-------------------------------------------------------------- -void CircleApp::touchUp(ofTouchEventArgs &touch){ - -} - -//-------------------------------------------------------------- -void CircleApp::touchDoubleTap(ofTouchEventArgs &touch){ - -} - -//-------------------------------------------------------------- -void CircleApp::lostFocus(){ - -} - -//-------------------------------------------------------------- -void CircleApp::gotFocus(){ - -} - -//-------------------------------------------------------------- -void CircleApp::gotMemoryWarning(){ - -} - -//-------------------------------------------------------------- -void CircleApp::deviceOrientationChanged(int newOrientation){ - if (UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation)){ - // code for landscape orientation - cout<<"CircleApp::deviceOrientationChanged to landscape"<isRetinaSupportedOnDevice()) - fontSize *= 2; - - font.load("fonts/frabk.ttf", fontSize); - - image.load("images/dive.jpg"); -} - -//-------------------------------------------------------------- -void ImageApp::update(){ - -} - -//-------------------------------------------------------------- -void ImageApp::draw() { - int x = (ofGetWidth() - image.getWidth()) * 0.5; - int y = (ofGetHeight() - image.getHeight()) * 0.5; - int p = 0; - - ofSetColor(ofColor::white); - image.draw(x, y); - - x = ofGetWidth() * 0.2; - y = ofGetHeight() * 0.11; - p = ofGetHeight() * 0.035; - - ofSetColor(ofColor::white); - font.drawString("frame num = " + ofToString( ofGetFrameNum() ), x, y+=p); - font.drawString("frame rate = " + ofToString( ofGetFrameRate() ), x, y+=p); - font.drawString("screen width = " + ofToString( ofGetWidth() ), x, y+=p); - font.drawString("screen height = " + ofToString( ofGetHeight() ), x, y+=p); -} - -//-------------------------------------------------------------- -void ImageApp::exit() { - // -} - -//-------------------------------------------------------------- -void ImageApp::touchDown(ofTouchEventArgs &touch){ - -} - -//-------------------------------------------------------------- -void ImageApp::touchMoved(ofTouchEventArgs &touch){ - -} - -//-------------------------------------------------------------- -void ImageApp::touchUp(ofTouchEventArgs &touch){ - -} - -//-------------------------------------------------------------- -void ImageApp::touchDoubleTap(ofTouchEventArgs &touch){ - -} - -//-------------------------------------------------------------- -void ImageApp::lostFocus(){ - -} - -//-------------------------------------------------------------- -void ImageApp::gotFocus(){ - -} - -//-------------------------------------------------------------- -void ImageApp::gotMemoryWarning(){ - -} - -//-------------------------------------------------------------- -void ImageApp::deviceOrientationChanged(int newOrientation){ - -} - - -//-------------------------------------------------------------- -void ImageApp::touchCancelled(ofTouchEventArgs& args){ - -} - diff --git a/examples/ios/iosNativeARCExample/src/Apps/SquareApp.h b/examples/ios/iosNativeARCExample/src/Apps/SquareApp.h deleted file mode 100644 index e371d255c66..00000000000 --- a/examples/ios/iosNativeARCExample/src/Apps/SquareApp.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once - -#include "ofxiOS.h" - -class SquareApp : public ofxiOSApp { - -public: - - SquareApp (); - ~SquareApp (); - - void setup(); - void update(); - void draw(); - void exit(); - - void touchDown(ofTouchEventArgs &touch); - void touchMoved(ofTouchEventArgs &touch); - void touchUp(ofTouchEventArgs &touch); - void touchDoubleTap(ofTouchEventArgs &touch); - void touchCancelled(ofTouchEventArgs &touch); - - void lostFocus(); - void gotFocus(); - void gotMemoryWarning(); - void deviceOrientationChanged(int newOrientation); - - ofTrueTypeFont font; -}; - - diff --git a/examples/ios/iosNativeARCExample/src/Apps/SquareApp.mm b/examples/ios/iosNativeARCExample/src/Apps/SquareApp.mm deleted file mode 100644 index d71094a7294..00000000000 --- a/examples/ios/iosNativeARCExample/src/Apps/SquareApp.mm +++ /dev/null @@ -1,103 +0,0 @@ -#include "SquareApp.h" - -//-------------------------------------------------------------- -SquareApp :: SquareApp () { - cout << "creating SquareApp" << endl; -} - -//-------------------------------------------------------------- -SquareApp :: ~SquareApp () { - cout << "destroying SquareApp" << endl; -} - -//-------------------------------------------------------------- -void SquareApp::setup() { - ofBackground(127); - - int fontSize = 8; - if (ofxiOSGetOFWindow()->isRetinaSupportedOnDevice()) - fontSize *= 2; - - font.load("fonts/frabk.ttf", fontSize); -} - -//-------------------------------------------------------------- -void SquareApp::update(){ - -} - -//-------------------------------------------------------------- -void SquareApp::draw() { - ofEnableAlphaBlending(); - - int w = MIN(ofGetWidth(), ofGetHeight()) * 0.6; - int h = w; - int x = (ofGetWidth() - w) * 0.5; - int y = (ofGetHeight() - h) * 0.5; - int p = 0; - - ofSetColor(ofColor::red); - ofDrawRectangle(x, y, w, h); - - x = ofGetWidth() * 0.2; - y = ofGetHeight() * 0.11; - p = ofGetHeight() * 0.035; - - ofSetColor(ofColor::white); - font.drawString("frame num = " + ofToString( ofGetFrameNum() ), x, y+=p); - font.drawString("frame rate = " + ofToString( ofGetFrameRate() ), x, y+=p); - font.drawString("screen width = " + ofToString( ofGetWidth() ), x, y+=p); - font.drawString("screen height = " + ofToString( ofGetHeight() ), x, y+=p); -} - -//-------------------------------------------------------------- -void SquareApp::exit() { - // -} - -//-------------------------------------------------------------- -void SquareApp::touchDown(ofTouchEventArgs &touch){ - -} - -//-------------------------------------------------------------- -void SquareApp::touchMoved(ofTouchEventArgs &touch){ - -} - -//-------------------------------------------------------------- -void SquareApp::touchUp(ofTouchEventArgs &touch){ - -} - -//-------------------------------------------------------------- -void SquareApp::touchDoubleTap(ofTouchEventArgs &touch){ - -} - -//-------------------------------------------------------------- -void SquareApp::lostFocus(){ - -} - -//-------------------------------------------------------------- -void SquareApp::gotFocus(){ - -} - -//-------------------------------------------------------------- -void SquareApp::gotMemoryWarning(){ - -} - -//-------------------------------------------------------------- -void SquareApp::deviceOrientationChanged(int newOrientation){ - -} - - -//-------------------------------------------------------------- -void SquareApp::touchCancelled(ofTouchEventArgs& args){ - -} - diff --git a/examples/ios/iosNativeARCExample/src/Apps/TriangleApp.h b/examples/ios/iosNativeARCExample/src/Apps/TriangleApp.h deleted file mode 100644 index 086e416b235..00000000000 --- a/examples/ios/iosNativeARCExample/src/Apps/TriangleApp.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once - -#include "ofxiOS.h" - -class TriangleApp : public ofxiOSApp { - -public: - - TriangleApp (); - ~TriangleApp (); - - void setup(); - void update(); - void draw(); - void exit(); - - void touchDown(ofTouchEventArgs &touch); - void touchMoved(ofTouchEventArgs &touch); - void touchUp(ofTouchEventArgs &touch); - void touchDoubleTap(ofTouchEventArgs &touch); - void touchCancelled(ofTouchEventArgs &touch); - - void lostFocus(); - void gotFocus(); - void gotMemoryWarning(); - void deviceOrientationChanged(int newOrientation); - - ofTrueTypeFont font; -}; - - diff --git a/examples/ios/iosNativeARCExample/src/Apps/TriangleApp.mm b/examples/ios/iosNativeARCExample/src/Apps/TriangleApp.mm deleted file mode 100644 index 646dc61e4f9..00000000000 --- a/examples/ios/iosNativeARCExample/src/Apps/TriangleApp.mm +++ /dev/null @@ -1,101 +0,0 @@ -#include "TriangleApp.h" - -//-------------------------------------------------------------- -TriangleApp :: TriangleApp () { - cout << "creating TriangleApp" << endl; -} - -//-------------------------------------------------------------- -TriangleApp :: ~TriangleApp () { - cout << "destroying TriangleApp" << endl; -} - -//-------------------------------------------------------------- -void TriangleApp::setup() { - ofBackground(127); - - int fontSize = 8; - if (ofxiOSGetOFWindow()->isRetinaSupportedOnDevice()) - fontSize *= 2; - - font.load("fonts/frabk.ttf", fontSize); -} - -//-------------------------------------------------------------- -void TriangleApp::update(){ - -} - -//-------------------------------------------------------------- -void TriangleApp::draw() { - int a = MIN(ofGetWidth(), ofGetHeight()) * 0.3; - int b = sqrt( a * a + a * a ); - int x = ofGetWidth() * 0.5; - int y = ofGetHeight() * 0.5; - int p = 0; - - ofSetColor(ofColor::red); - ofDrawTriangle(x, y - a, x + b, y + b, x - b, y + b); - - x = ofGetWidth() * 0.2; - y = ofGetHeight() * 0.11; - p = ofGetHeight() * 0.035; - - ofSetColor(ofColor::white); - font.drawString("frame num = " + ofToString( ofGetFrameNum() ), x, y+=p); - font.drawString("frame rate = " + ofToString( ofGetFrameRate() ), x, y+=p); - font.drawString("screen width = " + ofToString( ofGetWidth() ), x, y+=p); - font.drawString("screen height = " + ofToString( ofGetHeight() ), x, y+=p); -} - -//-------------------------------------------------------------- -void TriangleApp::exit() { - // -} - -//-------------------------------------------------------------- -void TriangleApp::touchDown(ofTouchEventArgs &touch){ - -} - -//-------------------------------------------------------------- -void TriangleApp::touchMoved(ofTouchEventArgs &touch){ - -} - -//-------------------------------------------------------------- -void TriangleApp::touchUp(ofTouchEventArgs &touch){ - -} - -//-------------------------------------------------------------- -void TriangleApp::touchDoubleTap(ofTouchEventArgs &touch){ - -} - -//-------------------------------------------------------------- -void TriangleApp::lostFocus(){ - -} - -//-------------------------------------------------------------- -void TriangleApp::gotFocus(){ - -} - -//-------------------------------------------------------------- -void TriangleApp::gotMemoryWarning(){ - -} - -//-------------------------------------------------------------- -void TriangleApp::deviceOrientationChanged(int newOrientation){ - -} - - -//-------------------------------------------------------------- -void TriangleApp::touchCancelled(ofTouchEventArgs& args){ - -} - diff --git a/examples/ios/iosNativeARCExample/src/UI/MyAppDelegate.h b/examples/ios/iosNativeARCExample/src/UI/MyAppDelegate.h deleted file mode 100644 index be38a852dd7..00000000000 --- a/examples/ios/iosNativeARCExample/src/UI/MyAppDelegate.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// MyAppDelegate.h -// Created by lukasz karluk on 12/12/11. -// - -#import "ofxiOSAppDelegate.h" - -@interface MyAppDelegate : ofxiOSAppDelegate { - // -} - -@property (nonatomic, retain) UINavigationController* navigationController; - -@end diff --git a/examples/ios/iosNativeARCExample/src/UI/MyAppDelegate.mm b/examples/ios/iosNativeARCExample/src/UI/MyAppDelegate.mm deleted file mode 100644 index a89ddf836b1..00000000000 --- a/examples/ios/iosNativeARCExample/src/UI/MyAppDelegate.mm +++ /dev/null @@ -1,45 +0,0 @@ -// -// MyAppDelegate.m -// Created by lukasz karluk on 12/12/11. -// - -#import "MyAppDelegate.h" -#import "MyAppViewController.h" - -@implementation MyAppDelegate - -@synthesize navigationController; - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - - [super applicationDidFinishLaunching:application]; - - /** - * - * Below is where you insert your own UIViewController and take control of the App. - * In this example im creating a UINavigationController and adding it as my RootViewController to the window. (this is essential) - * UINavigationController is handy for managing the navigation between multiple view controllers, more info here, - * http://developer.apple.com/library/ios/#documentation/uikit/reference/UINavigationController_Class/Reference/Reference.html - * - * I then push oFAppViewController onto the UINavigationController stack. - * oFAppViewController is a custom view controller with a 3 button menu. - * - **/ - - self.navigationController = [[UINavigationController alloc] init]; - [self.window setRootViewController:self.navigationController]; - - [self.navigationController pushViewController:[[MyAppViewController alloc] init] animated:YES]; - - //--- style the UINavigationController - self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent; - self.navigationController.navigationBar.topItem.title = @"Home"; - - return YES; -} - -- (void) dealloc { - self.navigationController = nil; -} - -@end diff --git a/examples/ios/iosNativeARCExample/src/UI/MyAppViewController.h b/examples/ios/iosNativeARCExample/src/UI/MyAppViewController.h deleted file mode 100644 index df0ba656f6c..00000000000 --- a/examples/ios/iosNativeARCExample/src/UI/MyAppViewController.h +++ /dev/null @@ -1,10 +0,0 @@ -// -// MyAppViewController.h -// Created by lukasz karluk on 12/12/11. -// - -#import - -@interface MyAppViewController : UIViewController - -@end diff --git a/examples/ios/iosNativeARCExample/src/UI/MyAppViewController.mm b/examples/ios/iosNativeARCExample/src/UI/MyAppViewController.mm deleted file mode 100644 index 95a26dd04ac..00000000000 --- a/examples/ios/iosNativeARCExample/src/UI/MyAppViewController.mm +++ /dev/null @@ -1,206 +0,0 @@ -// -// MenuViewController.m -// Created by lukasz karluk on 12/12/11. -// Updated for iOS8+ by Andreas Borg 11/18/15 - -#import "MyAppViewController.h" - -#import "SquareAppViewController.h" -#import "SquareApp.h" - -#import "CircleAppViewController.h" -#import "CircleApp.h" - -#import "TriangleAppViewController.h" -#import "TriangleApp.h" - -#import "ImageAppViewController.h" -#import "ImageApp.h" - - - -@interface MyAppViewController() -@property UIScrollView* containerView; -@end - -@implementation MyAppViewController - - - -- (UIButton*) makeButtonWithFrame:(CGRect)frame - andText:(NSString*)text { - UIFont *font; - font = [UIFont fontWithName:@"Georgia" size:30]; - - UILabel *label; - label = [[ UILabel alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)]; - label.backgroundColor = [UIColor colorWithWhite:1 alpha:0.95]; - label.textColor = [UIColor colorWithWhite:0 alpha:1]; - label.text = [text uppercaseString]; - label.textAlignment = NSTextAlignmentCenter; - label.font = font; - label.userInteractionEnabled = NO; - label.exclusiveTouch = NO; - - UIButton* button = [[UIButton alloc] initWithFrame:frame]; - [button setBackgroundColor:[UIColor clearColor]]; - [button addSubview:label]; - - return button; -} - -- (void)loadView { - [super loadView]; - - - - self.view.backgroundColor = [UIColor grayColor]; - - - CGRect screenRect = [[UIScreen mainScreen] bounds]; - - CGRect scrollViewFrame = CGRectMake(0.f, - 0.f, - screenRect.size.width, - screenRect.size.height); - - self.containerView = [[UIScrollView alloc] initWithFrame:scrollViewFrame]; - self.containerView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - self.containerView.backgroundColor = [UIColor clearColor]; - self.containerView.showsHorizontalScrollIndicator = NO; - self.containerView.showsVerticalScrollIndicator = YES; - self.containerView.alwaysBounceVertical = YES; - [self.view addSubview:self.containerView]; - - NSArray *buttonTitles; - buttonTitles = [NSArray arrayWithObjects: @"square", @"circle", @"triangle", @"image", nil]; - - NSInteger buttonY = 44; // make room for navigation bar. - NSInteger buttonGap = 2; - NSInteger buttonHeight = (screenRect.size.height - 44) / [buttonTitles count] - buttonGap * ([buttonTitles count] - 1); - CGRect buttonRect = CGRectMake(0, 0, screenRect.size.width, buttonHeight); - - for (int i = 0; i < [buttonTitles count]; i++) { - UIButton *button; - button = [self makeButtonWithFrame:CGRectMake(0, buttonY, buttonRect.size.width, buttonRect.size.height) - andText:[buttonTitles objectAtIndex:i]]; - [self.containerView addSubview:button ]; - - if (i== 0) - [button addTarget:self action:@selector(button1Pressed:) forControlEvents:UIControlEventTouchUpInside]; - else if (i==1) - [button addTarget:self action:@selector(button2Pressed:) forControlEvents:UIControlEventTouchUpInside]; - else if (i==2) - [button addTarget:self action:@selector(button3Pressed:) forControlEvents:UIControlEventTouchUpInside]; - else if (i==3) - [button addTarget:self action:@selector(button4Pressed:) forControlEvents:UIControlEventTouchUpInside]; - - buttonY += buttonRect.size.height; - buttonY += buttonGap; - } - - self.containerView.contentSize = CGSizeMake(buttonRect.size.width, buttonRect.size.height * 3); -} - -- (void)button1Pressed:(id)sender { - SquareAppViewController *viewController; - viewController = [[SquareAppViewController alloc] initWithFrame:[[UIScreen mainScreen] bounds] - app:new SquareApp()]; - - [self.navigationController pushViewController:viewController animated:YES]; - self.navigationController.navigationBar.topItem.title = @"SquareApp"; -} - -- (void)button2Pressed:(id)sender { - CircleAppViewController *viewController; - viewController = [[CircleAppViewController alloc] initWithFrame:[[UIScreen mainScreen] bounds] - app:new CircleApp()]; - - [self.navigationController pushViewController:viewController animated:YES]; - self.navigationController.navigationBar.topItem.title = @"CircleApp"; -} - -- (void)button3Pressed:(id)sender { - TriangleAppViewController *viewController; - viewController = [[TriangleAppViewController alloc] initWithFrame:[[UIScreen mainScreen] bounds] - app:new TriangleApp()]; - - [self.navigationController pushViewController:viewController animated:YES]; - self.navigationController.navigationBar.topItem.title = @"TriangleApp"; -} - -- (void)button4Pressed:(id)sender { - ImageAppViewController *viewController; - viewController = [[ImageAppViewController alloc] initWithFrame:[[UIScreen mainScreen] bounds] - app:new ImageApp()]; - - [self.navigationController pushViewController:viewController animated:YES]; - self.navigationController.navigationBar.topItem.title = @"ImageApp"; -} -// iOS7- -//borg -- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { - return NO; -/* - BOOL bRotate = NO; - bRotate = bRotate || (toInterfaceOrientation == UIInterfaceOrientationPortrait); - bRotate = bRotate || (toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown); - return bRotate; - */ -} - - - -// iOS8+ version of willAnimateRotationToInterfaceOrientation -//borg -- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id)coordinator { - //this only reports accurately when this is actually in view. If you enter an app, - //then rotate and exit, it will not be updating correctly..hence still needs - //separate updateLayout checking active rotation - cout<<"MyAppViewController - w "<startAppWithDelegate("MyAppDelegate"); - - - -} \ No newline at end of file