Initial commit
This commit is contained in:
commit
f9de4b806e
33
.gitignore
vendored
Normal file
33
.gitignore
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
# 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
|
||||
|
||||
# Bundler
|
||||
.bundle
|
||||
|
||||
Carthage
|
||||
# We recommend against adding the Pods directory to your .gitignore. However
|
||||
# you should judge for yourself, the pros and cons are mentioned at:
|
||||
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
|
||||
#
|
||||
# Note: if you ignore the Pods directory, make sure to uncomment
|
||||
# `pod install` in .travis.yml
|
||||
#
|
||||
# Pods/
|
||||
13
.travis.yml
Normal file
13
.travis.yml
Normal file
@ -0,0 +1,13 @@
|
||||
# references:
|
||||
# * http://www.objc.io/issue-6/travis-ci.html
|
||||
# * https://github.com/supermarin/xcpretty#usage
|
||||
|
||||
language: objective-c
|
||||
# cache: cocoapods
|
||||
# podfile: Example/Podfile
|
||||
# before_install:
|
||||
# - gem install cocoapods # Since Travis is not always on latest version
|
||||
# - pod install --project-directory=Example
|
||||
script:
|
||||
- set -o pipefail && xcodebuild test -workspace Example/PNKeyboardStateListener.xcworkspace -scheme PNKeyboardStateListener-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty
|
||||
- pod lib lint
|
||||
1351
Example/PNKeyboardStateListener.xcodeproj/project.pbxproj
Normal file
1351
Example/PNKeyboardStateListener.xcodeproj/project.pbxproj
Normal file
File diff suppressed because it is too large
Load Diff
7
Example/PNKeyboardStateListener.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
7
Example/PNKeyboardStateListener.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:PNKeyboardStateListener.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0720"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "6003F589195388D20070C39A"
|
||||
BuildableName = "PNKeyboardStateListener_Example.app"
|
||||
BlueprintName = "PNKeyboardStateListener_Example"
|
||||
ReferencedContainer = "container:PNKeyboardStateListener.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "6003F5AD195388D20070C39A"
|
||||
BuildableName = "PNKeyboardStateListener_Tests.xctest"
|
||||
BlueprintName = "PNKeyboardStateListener_Tests"
|
||||
ReferencedContainer = "container:PNKeyboardStateListener.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "6003F589195388D20070C39A"
|
||||
BuildableName = "PNKeyboardStateListener_Example.app"
|
||||
BlueprintName = "PNKeyboardStateListener_Example"
|
||||
ReferencedContainer = "container:PNKeyboardStateListener.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "6003F589195388D20070C39A"
|
||||
BuildableName = "PNKeyboardStateListener_Example.app"
|
||||
BlueprintName = "PNKeyboardStateListener_Example"
|
||||
ReferencedContainer = "container:PNKeyboardStateListener.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "6003F589195388D20070C39A"
|
||||
BuildableName = "PNKeyboardStateListener_Example.app"
|
||||
BlueprintName = "PNKeyboardStateListener_Example"
|
||||
ReferencedContainer = "container:PNKeyboardStateListener.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@ -0,0 +1,53 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"subtype" : "retina4",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
//
|
||||
// KeyboardStateListenerAppDelegate.h
|
||||
// PNKeyboardStateListener
|
||||
//
|
||||
// Created by Giuseppe Nucifora on 04/18/2016.
|
||||
// Copyright (c) 2016 Giuseppe Nucifora. All rights reserved.
|
||||
//
|
||||
|
||||
@import UIKit;
|
||||
|
||||
@interface KeyboardStateListenerAppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
@property (strong, nonatomic) UIWindow *window;
|
||||
|
||||
@end
|
||||
@ -0,0 +1,46 @@
|
||||
//
|
||||
// KeyboardStateListenerAppDelegate.m
|
||||
// PNKeyboardStateListener
|
||||
//
|
||||
// Created by Giuseppe Nucifora on 04/18/2016.
|
||||
// Copyright (c) 2016 Giuseppe Nucifora. All rights reserved.
|
||||
//
|
||||
|
||||
#import "KeyboardStateListenerAppDelegate.h"
|
||||
|
||||
@implementation KeyboardStateListenerAppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
// Override point for customization after application launch.
|
||||
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
|
||||
@ -0,0 +1,13 @@
|
||||
//
|
||||
// KeyboardStateListenerViewController.h
|
||||
// PNKeyboardStateListener
|
||||
//
|
||||
// Created by Giuseppe Nucifora on 04/18/2016.
|
||||
// Copyright (c) 2016 Giuseppe Nucifora. All rights reserved.
|
||||
//
|
||||
|
||||
@import UIKit;
|
||||
|
||||
@interface KeyboardStateListenerViewController : UIViewController
|
||||
|
||||
@end
|
||||
@ -0,0 +1,29 @@
|
||||
//
|
||||
// KeyboardStateListenerViewController.m
|
||||
// PNKeyboardStateListener
|
||||
//
|
||||
// Created by Giuseppe Nucifora on 04/18/2016.
|
||||
// Copyright (c) 2016 Giuseppe Nucifora. All rights reserved.
|
||||
//
|
||||
|
||||
#import "KeyboardStateListenerViewController.h"
|
||||
|
||||
@interface KeyboardStateListenerViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation KeyboardStateListenerViewController
|
||||
|
||||
- (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
|
||||
27
Example/PNKeyboardStateListener/Main.storyboard
Normal file
27
Example/PNKeyboardStateListener/Main.storyboard
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="whP-gf-Uak">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="wQg-tq-qST">
|
||||
<objects>
|
||||
<viewController id="whP-gf-Uak" customClass="KeyboardStateListenerViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="uEw-UM-LJ8"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="Mvr-aV-6Um"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="TpU-gO-2f1">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="tc2-Qw-aMS" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="305" y="433"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -0,0 +1,16 @@
|
||||
//
|
||||
// Prefix header
|
||||
//
|
||||
// The contents of this file are implicitly included at the beginning of every source file.
|
||||
//
|
||||
|
||||
#import <Availability.h>
|
||||
|
||||
#ifndef __IPHONE_5_0
|
||||
#warning "This project uses features only available in iOS SDK 5.0 and later."
|
||||
#endif
|
||||
|
||||
#ifdef __OBJC__
|
||||
@import UIKit;
|
||||
@import Foundation;
|
||||
#endif
|
||||
@ -0,0 +1,2 @@
|
||||
/* Localized versions of Info.plist keys */
|
||||
|
||||
17
Example/PNKeyboardStateListener/main.m
Normal file
17
Example/PNKeyboardStateListener/main.m
Normal file
@ -0,0 +1,17 @@
|
||||
//
|
||||
// main.m
|
||||
// PNKeyboardStateListener
|
||||
//
|
||||
// Created by Giuseppe Nucifora on 04/18/2016.
|
||||
// Copyright (c) 2016 Giuseppe Nucifora. All rights reserved.
|
||||
//
|
||||
|
||||
@import UIKit;
|
||||
#import "KeyboardStateListenerAppDelegate.h"
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
@autoreleasepool {
|
||||
return UIApplicationMain(argc, argv, nil, NSStringFromClass([KeyboardStateListenerAppDelegate class]));
|
||||
}
|
||||
}
|
||||
14
Example/Podfile
Normal file
14
Example/Podfile
Normal file
@ -0,0 +1,14 @@
|
||||
use_frameworks!
|
||||
|
||||
target 'PNKeyboardStateListener_Example', :exclusive => true do
|
||||
pod 'PNKeyboardStateListener', :path => '../'
|
||||
end
|
||||
|
||||
target 'PNKeyboardStateListener_Tests', :exclusive => true do
|
||||
pod 'PNKeyboardStateListener', :path => '../'
|
||||
|
||||
pod 'Specta'
|
||||
pod 'Expecta'
|
||||
pod 'FBSnapshotTestCase'
|
||||
pod 'Expecta+Snapshots'
|
||||
end
|
||||
22
Example/Tests/Tests-Info.plist
Normal file
22
Example/Tests/Tests-Info.plist
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
10
Example/Tests/Tests-Prefix.pch
Normal file
10
Example/Tests/Tests-Prefix.pch
Normal file
@ -0,0 +1,10 @@
|
||||
// The contents of this file are implicitly included at the beginning of every test case source file.
|
||||
|
||||
#ifdef __OBJC__
|
||||
|
||||
@import Specta;
|
||||
@import Expecta;
|
||||
@import FBSnapshotTestCase;
|
||||
@import Expecta_Snapshots;
|
||||
|
||||
#endif
|
||||
48
Example/Tests/Tests.m
Normal file
48
Example/Tests/Tests.m
Normal file
@ -0,0 +1,48 @@
|
||||
//
|
||||
// PNKeyboardStateListenerTests.m
|
||||
// PNKeyboardStateListenerTests
|
||||
//
|
||||
// Created by Giuseppe Nucifora on 04/18/2016.
|
||||
// Copyright (c) 2016 Giuseppe Nucifora. All rights reserved.
|
||||
//
|
||||
|
||||
// https://github.com/Specta/Specta
|
||||
|
||||
SpecBegin(InitialSpecs)
|
||||
|
||||
describe(@"these will fail", ^{
|
||||
|
||||
it(@"can do maths", ^{
|
||||
expect(1).to.equal(2);
|
||||
});
|
||||
|
||||
it(@"can read", ^{
|
||||
expect(@"number").to.equal(@"string");
|
||||
});
|
||||
|
||||
it(@"will wait for 10 seconds and fail", ^{
|
||||
waitUntil(^(DoneCallback done) {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe(@"these will pass", ^{
|
||||
|
||||
it(@"can do maths", ^{
|
||||
expect(1).beLessThan(23);
|
||||
});
|
||||
|
||||
it(@"can read", ^{
|
||||
expect(@"team").toNot.contain(@"I");
|
||||
});
|
||||
|
||||
it(@"will wait and succeed", ^{
|
||||
waitUntil(^(DoneCallback done) {
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
SpecEnd
|
||||
|
||||
2
Example/Tests/en.lproj/InfoPlist.strings
Normal file
2
Example/Tests/en.lproj/InfoPlist.strings
Normal file
@ -0,0 +1,2 @@
|
||||
/* Localized versions of Info.plist keys */
|
||||
|
||||
19
LICENSE
Normal file
19
LICENSE
Normal file
@ -0,0 +1,19 @@
|
||||
Copyright (c) 2016 Giuseppe Nucifora <me@giuseppenucifora.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
40
PNKeyboardStateListener.podspec
Normal file
40
PNKeyboardStateListener.podspec
Normal file
@ -0,0 +1,40 @@
|
||||
#
|
||||
# Be sure to run `pod lib lint PNKeyboardStateListener.podspec' to ensure this is a
|
||||
# valid spec before submitting.
|
||||
#
|
||||
# Any lines starting with a # are optional, but their use is encouraged
|
||||
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
|
||||
#
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "PNKeyboardStateListener"
|
||||
s.version = "0.1.0"
|
||||
s.summary = "A short description of PNKeyboardStateListener."
|
||||
|
||||
# This description is used to generate tags and improve search results.
|
||||
# * Think: What does it do? Why did you write it? What is the focus?
|
||||
# * Try to keep it short, snappy and to the point.
|
||||
# * Write the description between the DESC delimiters below.
|
||||
# * Finally, don't worry about the indent, CocoaPods strips it!
|
||||
|
||||
s.description = <<-DESC
|
||||
DESC
|
||||
|
||||
s.homepage = "https://github.com/<GITHUB_USERNAME>/PNKeyboardStateListener"
|
||||
# s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
|
||||
s.license = 'MIT'
|
||||
s.author = { "Giuseppe Nucifora" => "me@giuseppenucifora.com" }
|
||||
s.source = { :git => "https://github.com/<GITHUB_USERNAME>/PNKeyboardStateListener.git", :tag => s.version.to_s }
|
||||
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
|
||||
|
||||
s.ios.deployment_target = '8.0'
|
||||
|
||||
s.source_files = 'PNKeyboardStateListener/Classes/**/*'
|
||||
s.resource_bundles = {
|
||||
'PNKeyboardStateListener' => ['PNKeyboardStateListener/Assets/*.png']
|
||||
}
|
||||
|
||||
# s.public_header_files = 'Pod/Classes/**/*.h'
|
||||
# s.frameworks = 'UIKit', 'MapKit'
|
||||
# s.dependency 'AFNetworking', '~> 2.3'
|
||||
end
|
||||
0
PNKeyboardStateListener/Assets/.gitkeep
Normal file
0
PNKeyboardStateListener/Assets/.gitkeep
Normal file
0
PNKeyboardStateListener/Classes/.gitkeep
Normal file
0
PNKeyboardStateListener/Classes/.gitkeep
Normal file
0
PNKeyboardStateListener/Classes/ReplaceMe.m
Normal file
0
PNKeyboardStateListener/Classes/ReplaceMe.m
Normal file
29
README.md
Normal file
29
README.md
Normal file
@ -0,0 +1,29 @@
|
||||
# PNKeyboardStateListener
|
||||
|
||||
[](https://travis-ci.org/Giuseppe Nucifora/PNKeyboardStateListener)
|
||||
[](http://cocoapods.org/pods/PNKeyboardStateListener)
|
||||
[](http://cocoapods.org/pods/PNKeyboardStateListener)
|
||||
[](http://cocoapods.org/pods/PNKeyboardStateListener)
|
||||
|
||||
## Usage
|
||||
|
||||
To run the example project, clone the repo, and run `pod install` from the Example directory first.
|
||||
|
||||
## Requirements
|
||||
|
||||
## Installation
|
||||
|
||||
PNKeyboardStateListener is available through [CocoaPods](http://cocoapods.org). To install
|
||||
it, simply add the following line to your Podfile:
|
||||
|
||||
```ruby
|
||||
pod "PNKeyboardStateListener"
|
||||
```
|
||||
|
||||
## Author
|
||||
|
||||
Giuseppe Nucifora, me@giuseppenucifora.com
|
||||
|
||||
## License
|
||||
|
||||
PNKeyboardStateListener is available under the MIT license. See the LICENSE file for more info.
|
||||
1
_Pods.xcodeproj
Symbolic link
1
_Pods.xcodeproj
Symbolic link
@ -0,0 +1 @@
|
||||
Example/Pods/Pods.xcodeproj
|
||||
Loading…
x
Reference in New Issue
Block a user