Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Example/DSLCalendarViewExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
/* Begin PBXBuildFile section */
B5294AE615DCF9CF003DB0C2 /* DSLCalendarDayCalloutView.m in Sources */ = {isa = PBXBuildFile; fileRef = B5294AE515DCF9CF003DB0C2 /* DSLCalendarDayCalloutView.m */; };
B5294AE915DCFA59003DB0C2 /* DSLCalendarDayCalloutView.xib in Resources */ = {isa = PBXBuildFile; fileRef = B5294AE815DCFA59003DB0C2 /* DSLCalendarDayCalloutView.xib */; };
B534035D17B2583100D1204C /* Example.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B534035B17B2583100D1204C /* Example.storyboard */; };
B534036017B2590A00D1204C /* StoryboardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B534035F17B2590A00D1204C /* StoryboardViewController.m */; };
B5A24DC015D81F3D00F07396 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B5A24DBF15D81F3D00F07396 /* UIKit.framework */; };
B5A24DC215D81F3D00F07396 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B5A24DC115D81F3D00F07396 /* Foundation.framework */; };
B5A24DC415D81F3D00F07396 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B5A24DC315D81F3D00F07396 /* CoreGraphics.framework */; };
Expand Down Expand Up @@ -49,6 +51,9 @@
B5294AE415DCF9CF003DB0C2 /* DSLCalendarDayCalloutView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DSLCalendarDayCalloutView.h; sourceTree = "<group>"; };
B5294AE515DCF9CF003DB0C2 /* DSLCalendarDayCalloutView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DSLCalendarDayCalloutView.m; sourceTree = "<group>"; };
B5294AE815DCFA59003DB0C2 /* DSLCalendarDayCalloutView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DSLCalendarDayCalloutView.xib; sourceTree = "<group>"; };
B534035C17B2583100D1204C /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/Example.storyboard; sourceTree = "<group>"; };
B534035E17B2590A00D1204C /* StoryboardViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StoryboardViewController.h; sourceTree = "<group>"; };
B534035F17B2590A00D1204C /* StoryboardViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StoryboardViewController.m; sourceTree = "<group>"; };
B5A24DBB15D81F3D00F07396 /* DSLCalendarViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DSLCalendarViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
B5A24DBF15D81F3D00F07396 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
B5A24DC115D81F3D00F07396 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -152,6 +157,9 @@
B5A24DD115D81F3D00F07396 /* ViewController.h */,
B5A24DD215D81F3D00F07396 /* ViewController.m */,
B5A24DD415D81F3D00F07396 /* ViewController.xib */,
B534035E17B2590A00D1204C /* StoryboardViewController.h */,
B534035F17B2590A00D1204C /* StoryboardViewController.m */,
B534035B17B2583100D1204C /* Example.storyboard */,
B5A24DC615D81F3D00F07396 /* Supporting Files */,
);
path = DSLCalendarViewExample;
Expand Down Expand Up @@ -288,6 +296,7 @@
C15EF2FD1649223900318CE2 /* Icon-57.png in Resources */,
C15EF2FF1649230700318CE2 /* Default@2x.png in Resources */,
C15EF3011649230A00318CE2 /* Default.png in Resources */,
B534035D17B2583100D1204C /* Example.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -308,12 +317,21 @@
B5A24DF015D81F9A00F07396 /* DSLCalendarMonthSelectorView.m in Sources */,
B5294AE615DCF9CF003DB0C2 /* DSLCalendarDayCalloutView.m in Sources */,
B5E17D1615DD5F1E003DEDEA /* NSDate+DSLCalendarView.m in Sources */,
B534036017B2590A00D1204C /* StoryboardViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXVariantGroup section */
B534035B17B2583100D1204C /* Example.storyboard */ = {
isa = PBXVariantGroup;
children = (
B534035C17B2583100D1204C /* en */,
);
name = Example.storyboard;
sourceTree = "<group>";
};
B5A24DC815D81F3D00F07396 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
Expand Down
4 changes: 0 additions & 4 deletions Example/DSLCalendarViewExample/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@

#import <UIKit/UIKit.h>

@class ViewController;

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@property (strong, nonatomic) ViewController *viewController;

@end
36 changes: 4 additions & 32 deletions Example/DSLCalendarViewExample/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,13 @@

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
self.window.rootViewController = self.viewController;
self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil]];

[self.window makeKeyAndVisible];
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:.
return YES;
}

@end
13 changes: 13 additions & 0 deletions Example/DSLCalendarViewExample/StoryboardViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// StoryboardViewController.h
// DSLCalendarViewExample
//
// Created by Pete Callaway on 07/08/2013.
// Copyright (c) 2013 Pete Callaway. All rights reserved.
//

#import "ViewController.h"

@interface StoryboardViewController : ViewController

@end
18 changes: 18 additions & 0 deletions Example/DSLCalendarViewExample/StoryboardViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// StoryboardViewController.m
// DSLCalendarViewExample
//
// Created by Pete Callaway on 07/08/2013.
// Copyright (c) 2013 Pete Callaway. All rights reserved.
//

#import "StoryboardViewController.h"

@interface StoryboardViewController ()

@end


@implementation StoryboardViewController

@end
24 changes: 12 additions & 12 deletions Example/DSLCalendarViewExample/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,14 @@ @interface ViewController () <DSLCalendarViewDelegate>

@implementation ViewController

- (void)viewDidLoad
{
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.

self.calendarView.delegate = self;
}

- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
self.calendarView.delegate = self;
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Storyboard" style:UIBarButtonItemStyleBordered target:self action:@selector(didTapShowStoryboardExample:)];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}

Expand Down Expand Up @@ -88,4 +80,12 @@ - (BOOL)day:(NSDateComponents*)day1 isBeforeDay:(NSDateComponents*)day2 {
return ([day1.date compare:day2.date] == NSOrderedAscending);
}


#pragma mark Actions

- (void)didTapShowStoryboardExample:(id)sender {
UIViewController *controller = [[UIStoryboard storyboardWithName:@"Example" bundle:nil] instantiateInitialViewController];
[self.navigationController pushViewController:controller animated:YES];
}

@end
58 changes: 58 additions & 0 deletions Example/DSLCalendarViewExample/en.lproj/Example.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="6ii-0d-6x5">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/>
</dependencies>
<scenes>
<!--Storyboard View Controller-->
<scene sceneID="7zP-8w-6dw">
<objects>
<viewController id="6ii-0d-6x5" customClass="StoryboardViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="izH-jE-cEA">
<rect key="frame" x="0.0" y="20" width="320" height="548"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="View controller in a storyboard" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="oGx-5b-vRz">
<rect key="frame" x="46" y="507" width="229" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" id="HLp-ma-upu" customClass="DSLCalendarView">
<rect key="frame" x="0.0" y="0.0" width="320" height="310"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<connections>
<outlet property="calendarView" destination="HLp-ma-upu" id="Kqb-eC-6fK"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Pqb-7x-SPa" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="598" y="190"/>
</scene>
</scenes>
<classes>
<class className="DSLCalendarView" superclassName="UIView">
<source key="sourceIdentifier" type="project" relativePath="./Classes/DSLCalendarView.h"/>
</class>
<class className="StoryboardViewController" superclassName="ViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/StoryboardViewController.h"/>
</class>
<class className="ViewController" superclassName="UIViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/ViewController.h"/>
<relationships>
<relationship kind="outlet" name="calendarView" candidateClass="DSLCalendarView"/>
</relationships>
</class>
</classes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
</document>