-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds a basic foundation for cricket. It's setup as a cocoapod library and includes an example project. Currently it functions with a single handler: the build-in email composer.
- Loading branch information
Showing
291 changed files
with
6,905 additions
and
151 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,53 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="5023" systemVersion="13A603" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="BYZ-38-t0r"> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7702" systemVersion="14B25" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="bsx-Y8-Jae"> | ||
<dependencies> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/> | ||
</dependencies> | ||
<scenes> | ||
<!--class Prefix:identifier View Controller--> | ||
<scene sceneID="tne-QT-ifu"> | ||
<!--View Controller--> | ||
<scene sceneID="FgR-oy-Z74"> | ||
<objects> | ||
<viewController id="BYZ-38-t0r" customClass="NPViewController" sceneMemberID="viewController"> | ||
<viewController id="bsx-Y8-Jae" sceneMemberID="viewController"> | ||
<layoutGuides> | ||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/> | ||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> | ||
<viewControllerLayoutGuide type="top" id="jMg-Dr-Lwt"/> | ||
<viewControllerLayoutGuide type="bottom" id="97y-D4-xsu"/> | ||
</layoutGuides> | ||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> | ||
<view key="view" contentMode="scaleToFill" id="oRa-pQ-OeQ"> | ||
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> | ||
<subviews> | ||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="sheep" translatesAutoresizingMaskIntoConstraints="NO" id="6of-10-imu"> | ||
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/> | ||
</imageView> | ||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Welcome to Cricket!" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yHS-Cg-DvT"> | ||
<rect key="frame" x="178" y="461" width="413" height="101"/> | ||
<constraints> | ||
<constraint firstAttribute="height" constant="101" id="5vF-3g-9kP"/> | ||
<constraint firstAttribute="width" constant="413" id="YbJ-ZO-YV1"/> | ||
</constraints> | ||
<fontDescription key="fontDescription" type="system" pointSize="39"/> | ||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/> | ||
<nil key="highlightedColor"/> | ||
</label> | ||
</subviews> | ||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
<constraints> | ||
<constraint firstItem="6of-10-imu" firstAttribute="leading" secondItem="oRa-pQ-OeQ" secondAttribute="leading" id="0aV-Qc-fYE"/> | ||
<constraint firstAttribute="centerY" secondItem="yHS-Cg-DvT" secondAttribute="centerY" id="CQh-Aa-8rx"/> | ||
<constraint firstAttribute="centerX" secondItem="yHS-Cg-DvT" secondAttribute="centerX" id="HEs-u6-H45"/> | ||
<constraint firstItem="97y-D4-xsu" firstAttribute="top" secondItem="6of-10-imu" secondAttribute="bottom" id="anr-a2-8Bd"/> | ||
<constraint firstAttribute="trailing" secondItem="6of-10-imu" secondAttribute="trailing" id="eL1-1S-vZU"/> | ||
<constraint firstItem="6of-10-imu" firstAttribute="top" secondItem="oRa-pQ-OeQ" secondAttribute="top" id="pNf-1k-4db"/> | ||
</constraints> | ||
</view> | ||
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="iPad"/> | ||
</viewController> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="JzM-SD-phg" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="473" y="415"/> | ||
</scene> | ||
</scenes> | ||
<simulatedMetricsContainer key="defaultSimulatedMetrics"> | ||
<simulatedStatusBarMetrics key="statusBar"/> | ||
<simulatedOrientationMetrics key="orientation"/> | ||
<simulatedScreenMetrics key="destination"/> | ||
</simulatedMetricsContainer> | ||
<resources> | ||
<image name="sheep" width="2296" height="1288"/> | ||
</resources> | ||
</document> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
Example/NPCricket/Images.xcassets/sheep.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x", | ||
"filename" : "sheep.jpeg" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,25 @@ | ||
// | ||
// NPAppDelegate.m | ||
// NPCricket | ||
// | ||
// Created by CocoaPods on 05/09/2015. | ||
// Copyright (c) 2014 Nebojsa Petrovic. All rights reserved. | ||
// | ||
|
||
#import "NPAppDelegate.h" | ||
#import <NPCricket/NPCricket.h> | ||
|
||
@implementation NPAppDelegate | ||
|
||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | ||
{ | ||
// Override point for customization after application launch. | ||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | ||
[NPCricket setupWithHandler:[NPCricketInternalEmailComposerHandler emailComposerWithToEmailAddress:@"[email protected]" subjectPrefix:@"iOS"]]; | ||
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)applicationDidBecomeActive:(UIApplication *)application { | ||
[self becomeFirstResponder]; | ||
} | ||
|
||
- (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. | ||
- (BOOL)canBecomeFirstResponder { | ||
return YES; | ||
} | ||
|
||
- (void)applicationWillTerminate:(UIApplication *)application | ||
{ | ||
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. | ||
- (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event { | ||
if (motion == UIEventSubtypeMotionShake) { | ||
[NPCricket show]; | ||
} | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,4 @@ | ||
// | ||
// NPViewController.h | ||
// NPCricket | ||
// | ||
// Created by Nebojsa Petrovic on 05/09/2015. | ||
// Copyright (c) 2014 Nebojsa Petrovic. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface NPViewController : UIViewController | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,4 @@ | ||
// | ||
// NPViewController.m | ||
// NPCricket | ||
// | ||
// Created by Nebojsa Petrovic on 05/09/2015. | ||
// Copyright (c) 2014 Nebojsa Petrovic. All rights reserved. | ||
// | ||
|
||
#import "NPViewController.h" | ||
|
||
@interface NPViewController () | ||
|
||
@end | ||
|
||
@implementation NPViewController | ||
|
||
- (void)viewDidLoad | ||
{ | ||
[super viewDidLoad]; | ||
// Do any additional setup after loading the view, typically from a nib. | ||
} | ||
|
||
- (void)didReceiveMemoryWarning | ||
{ | ||
[super didReceiveMemoryWarning]; | ||
// Dispose of any resources that can be recreated. | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
PODS: | ||
- Expecta (1.0.0) | ||
- NPCricket (0.1.0) | ||
- Specta (1.0.0) | ||
|
||
DEPENDENCIES: | ||
- Expecta | ||
- NPCricket (from `../`) | ||
- Specta | ||
|
||
EXTERNAL SOURCES: | ||
NPCricket: | ||
:path: ../ | ||
|
||
SPEC CHECKSUMS: | ||
Expecta: 32604574add2c46a36f8d2f716b6c5736eb75024 | ||
NPCricket: 79c9cb07d386b38f0fbb38355af40b1c831819c2 | ||
Specta: 96fe05fe5c7348b5223f85e862904f6e832abb14 | ||
|
||
COCOAPODS: 0.37.1 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.