Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customization through options dictionary #2

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
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
Binary file added DerpDemo/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DerpDemo/Default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DerpDemo/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions DerpDemo/DerpDemo-Info.plist
Original file line number Diff line number Diff line change
@@ -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>de.yangmeyer.${PRODUCT_NAME:rfc1034identifier}</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>MainStoryboard_iPhone</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>
14 changes: 14 additions & 0 deletions DerpDemo/DerpDemo-Prefix.pch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// Prefix header for all source files of the 'DerpDemo' target in the 'DerpDemo' project
//

#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/UIKit.h>
#import <Foundation/Foundation.h>
#endif
11 changes: 11 additions & 0 deletions DerpDemo/YMAppDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

// Created by YangMeyer on 17.10.12.
// Copyright (c) 2012 Yang Meyer. All rights reserved.

#import <UIKit/UIKit.h>

@interface YMAppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@end
9 changes: 9 additions & 0 deletions DerpDemo/YMAppDelegate.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

// Created by YangMeyer on 17.10.12.
// Copyright (c) 2012 Yang Meyer. All rights reserved.

#import "YMAppDelegate.h"

@implementation YMAppDelegate

@end
9 changes: 9 additions & 0 deletions DerpDemo/YMViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

// Created by YangMeyer on 17.10.12.
// Copyright (c) 2012 Yang Meyer. All rights reserved.

#import <UIKit/UIKit.h>

@interface YMViewController : UIViewController <UITextFieldDelegate>

@end
28 changes: 28 additions & 0 deletions DerpDemo/YMViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

// Created by YangMeyer on 17.10.12.
// Copyright (c) 2012 Yang Meyer. All rights reserved.

#import "YMViewController.h"
#import "UIViewController+Derp.h"

@implementation YMViewController

- (void)viewDidLoad
{
[super viewDidLoad];
[self derp_addKeyboardViewHandlers];
}

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

- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
[textField resignFirstResponder];
return YES;
}

@end
2 changes: 2 additions & 0 deletions DerpDemo/en.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

75 changes: 75 additions & 0 deletions DerpDemo/en.lproj/MainStoryboard_iPhone.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="2840" systemVersion="11E53" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="2">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1926"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="5">
<objects>
<viewController id="2" customClass="YMViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="3">
<rect key="frame" x="0.0" y="20" width="320" height="460"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gRv-OL-qgH">
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="K3V-xD-ywe">
<color key="backgroundColor" red="1" green="0.88214472939999999" blue="0.76531427559999998" alpha="1" colorSpace="deviceRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<connections>
<outlet property="delegate" destination="2" id="NsS-jo-jXb"/>
</connections>
</textField>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ArS-kN-8BH">
<color key="backgroundColor" red="0.73725491759999995" green="0.15686275059999999" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<connections>
<outlet property="delegate" destination="2" id="tn7-Z3-hfF"/>
</connections>
</textField>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Jj3-pV-B34">
<constraints>
<constraint firstAttribute="width" constant="150" id="eGM-Ah-4cG"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<connections>
<outlet property="delegate" destination="2" id="hRT-bW-ZeA"/>
</connections>
</textField>
</subviews>
<color key="backgroundColor" red="1" green="0.54901963470000004" blue="0.1019607931" alpha="1" colorSpace="deviceRGB"/>
<constraints>
<constraint firstItem="Jj3-pV-B34" firstAttribute="top" secondItem="gRv-OL-qgH" secondAttribute="top" constant="25" id="7ga-fI-qzM"/>
<constraint firstItem="K3V-xD-ywe" firstAttribute="trailing" secondItem="ArS-kN-8BH" secondAttribute="trailing" type="default" id="JO4-wd-qib"/>
<constraint firstItem="Jj3-pV-B34" firstAttribute="trailing" secondItem="ArS-kN-8BH" secondAttribute="trailing" type="default" id="cle-21-MGf"/>
<constraint firstItem="K3V-xD-ywe" firstAttribute="leading" secondItem="ArS-kN-8BH" secondAttribute="leading" type="default" id="cmK-gL-OJM"/>
<constraint firstAttribute="bottom" secondItem="K3V-xD-ywe" secondAttribute="bottom" constant="20" symbolic="YES" type="user" id="dlW-1s-l4Q"/>
<constraint firstItem="K3V-xD-ywe" firstAttribute="top" secondItem="ArS-kN-8BH" secondAttribute="bottom" constant="21" type="user" id="lCa-4w-uUM"/>
<constraint firstItem="Jj3-pV-B34" firstAttribute="leading" secondItem="ArS-kN-8BH" secondAttribute="leading" type="default" id="tNb-ik-pMI"/>
<constraint firstItem="ArS-kN-8BH" firstAttribute="centerX" secondItem="gRv-OL-qgH" secondAttribute="centerX" type="default" id="wt9-yn-L7g"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="gRv-OL-qgH" firstAttribute="leading" secondItem="3" secondAttribute="leading" constant="5" type="user" id="3bQ-bL-Iwp"/>
<constraint firstAttribute="bottom" secondItem="gRv-OL-qgH" secondAttribute="bottom" constant="5" type="user" id="4W7-NP-x5m"/>
<constraint firstItem="gRv-OL-qgH" firstAttribute="top" secondItem="3" secondAttribute="top" constant="5" type="user" id="JGX-Ml-SNx"/>
<constraint firstItem="gRv-OL-qgH" firstAttribute="centerX" secondItem="3" secondAttribute="centerX" type="default" id="qcZ-ua-6CD"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="4" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination"/>
</simulatedMetricsContainer>
</document>
18 changes: 18 additions & 0 deletions DerpDemo/main.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// main.m
// DerpDemo
//
// Created by YangMeyer on 17.10.12.
// Copyright (c) 2012 Mustacheware. All rights reserved.
//

#import <UIKit/UIKit.h>

#import "YMAppDelegate.h"

int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([YMAppDelegate class]));
}
}
Loading