Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Simko committed Dec 9, 2013
1 parent 3112041 commit 1baee9e
Show file tree
Hide file tree
Showing 45 changed files with 3,381 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.DS_Store
.AppleDouble
.LSOverride

# Icon must ends with two \r.
Icon


# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes

# OS X
.DS_Store

# Xcode
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
profile
*.moved-aside
DerivedData
*.hmap
*.ipa

# CocoaPods
Pods
571 changes: 571 additions & 0 deletions test.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions test.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions test/AppDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// AppDelegate.h
// test
//
// Created by Rick on 2013-12-09.
// Copyright (c) 2013 Rick. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@end
52 changes: 52 additions & 0 deletions test/AppDelegate.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
//
// AppDelegate.m
// test
//
// Created by Rick on 2013-12-09.
// Copyright (c) 2013 Rick. All rights reserved.
//

#import "AppDelegate.h"
#import "SlidingViewController.h"
#import "CustomWindow.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
SlidingViewController *slidingView = [[SlidingViewController alloc] initWithNibName:NSStringFromClass([SlidingViewController class]) bundle:nil];
self.window = [[CustomWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window.rootViewController = slidingView;

return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application
{
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

- (void)applicationDidEnterBackground:(UIApplication *)application
{
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

- (void)applicationWillEnterForeground:(UIApplication *)application
{
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

- (void)applicationDidBecomeActive:(UIApplication *)application
{

// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

- (void)applicationWillTerminate:(UIApplication *)application
{
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

@end
26 changes: 26 additions & 0 deletions test/Base.lproj/Main_iPad.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4451" systemVersion="13A461" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3676"/>
</dependencies>
<scenes>
<!--class Prefix:identifier View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="20" width="768" height="1004"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackOpaque"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination"/>
</simulatedMetricsContainer>
</document>
26 changes: 26 additions & 0 deletions test/Base.lproj/Main_iPhone.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4451" systemVersion="13A461" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="vXZ-lx-hvc">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3676"/>
</dependencies>
<scenes>
<!--class Prefix:identifier View Controller-->
<scene sceneID="ufC-wZ-h7g">
<objects>
<viewController id="vXZ-lx-hvc" customClass="ViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
</document>
15 changes: 15 additions & 0 deletions test/CustomNavController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// URNavController.h
// Remote
//
// Created by Richard Simko on 8/2/13.
// Copyright (c) 2013 Unified Intents. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface CustomNavController : UINavigationController

@property (nonatomic, retain) IBOutlet UIToolbar *toolbar;

@end
74 changes: 74 additions & 0 deletions test/CustomNavController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
//
// URNavController.m
// Remote
//
// Created by Richard Simko on 8/2/13.
// Copyright (c) 2013 Unified Intents. All rights reserved.
//

#import "CustomNavController.h"
#import "ECSlidingViewController.h"
#import "LeftMenuController.h"
#import "LeftMenuController.h"
#import "UIViewController+ECSlidingViewController.h"
#import "ECSlidingConstants.h"
#import "ViewController.h"

@interface CustomNavController ()

@property (nonatomic, retain) UIBarButtonItem *menuButton;

@end

@implementation CustomNavController

-(void)menuTap
{
[self.slidingViewController anchorTopViewToRightAnimated:YES];
}

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
self.menuButton = [[UIBarButtonItem alloc] initWithTitle:@"menu" style:UIBarButtonItemStylePlain target:self action:@selector(menuTap)];
}
return self;
}

- (void)viewDidLoad
{
[super viewDidLoad];
[self pushViewController:[[ViewController alloc] initWithNibName:NSStringFromClass([ViewController class]) bundle:nil] animated:YES];
}

-(void) viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
}

-(void) viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];

self.topViewController.navigationItem.leftBarButtonItem = self.menuButton;

if (![self.slidingViewController.underLeftViewController isKindOfClass:[LeftMenuController class]]) {
self.slidingViewController.underLeftViewController = [[LeftMenuController alloc] initWithNibName:NSStringFromClass([LeftMenuController class]) bundle:nil];
[self.view addGestureRecognizer:self.slidingViewController.panGesture];
self.slidingViewController.anchorRightRevealAmount = 220.0f;
}
}

- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
}

-(void)setViewControllers:(NSArray *)viewControllers
{
[super setViewControllers:viewControllers];
self.topViewController.navigationItem.leftBarButtonItem = self.menuButton;
}

@end
21 changes: 21 additions & 0 deletions test/CustomNavController.xib
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="CustomNavController">
<connections>
<outlet property="view" destination="1" id="3"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="1">
<rect key="frame" x="0.0" y="0.0" width="320" height="548"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
</view>
</objects>
</document>
13 changes: 13 additions & 0 deletions test/CustomWindow.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// URWindow.h
// Remote
//
// Created by Rick on 2013-08-08.
// Copyright (c) 2013 Unified Intents. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface CustomWindow : UIWindow

@end
46 changes: 46 additions & 0 deletions test/CustomWindow.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
//
// URWindow.m
// Remote
//
// Created by Rick on 2013-08-08.
// Copyright (c) 2013 Unified Intents. All rights reserved.
//

#import "CustomWindow.h"

@implementation CustomWindow

- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code
}
return self;
}

-(void)sendEvent:(UIEvent *)event
{
[super sendEvent:event];
}

- (void)makeKeyAndVisible
{
[super makeKeyAndVisible];
NSLog(@"makeKeyAndVisible");
}

- (void)becomeKeyWindow
{
[super becomeKeyWindow];
NSLog(@"becomeKeyWindow");

}

- (void)makeKeyWindow
{
[super makeKeyWindow];
NSLog(@"makekeyWindow");
}

@end
Loading

0 comments on commit 1baee9e

Please sign in to comment.