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

Initial implementation + demo #1

Open
wants to merge 1 commit 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
48 changes: 48 additions & 0 deletions Example/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
//
// AppDelegate.swift
// Example
//
// Created by Rui Peres on 15/02/2016.
// Copyright © 2016 Velhotes. All rights reserved.
//

import UIKit
import Lighter


@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

UIViewController.startLogging()
return true
}

func applicationWillResignActive(application: UIApplication) {
// 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.
}

func applicationDidEnterBackground(application: UIApplication) {
// 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.
}

func applicationWillEnterForeground(application: UIApplication) {
// 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.
}

func applicationDidBecomeActive(application: UIApplication) {
// 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.
}

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


}

73 changes: 73 additions & 0 deletions Example/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"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"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
27 changes: 27 additions & 0 deletions Example/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -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="8150" systemVersion="15A204g" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8122"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
136 changes: 136 additions & 0 deletions Example/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="dOm-cJ-Ymg">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
</dependencies>
<scenes>
<!--Navigation Controller-->
<scene sceneID="oTs-hB-LV7">
<objects>
<navigationController id="dOm-cJ-Ymg" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="xPg-SD-fFF">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="hlW-wj-deM" kind="relationship" relationship="rootViewController" id="tL3-U7-Bhk"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="7D9-H9-BQP" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1127" y="1232"/>
</scene>
<!--View Controller-->
<scene sceneID="8mF-wS-oNI">
<objects>
<viewController id="hlW-wj-deM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="j0y-W6-bv6"/>
<viewControllerLayoutGuide type="bottom" id="IVr-Au-4gZ"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="MED-qC-1ig">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2na-ZS-vDA">
<rect key="frame" x="277" y="254" width="32" height="30"/>
<state key="normal" title="Next"/>
<connections>
<segue destination="yFV-mZ-pXh" kind="push" id="uib-gd-PHc"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<navigationItem key="navigationItem" id="5GA-4Z-znX"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="KIt-l7-Ybd" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="240" y="1924"/>
</scene>
<!--View Controller-->
<scene sceneID="5mS-Dq-iIq">
<objects>
<viewController id="yFV-mZ-pXh" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="mp2-2I-y2Z"/>
<viewControllerLayoutGuide type="bottom" id="AdA-bL-TlR"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="3zR-TP-mt6">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rI6-Yj-XmF">
<rect key="frame" x="251" y="176" width="43" height="30"/>
<state key="normal" title="Modal"/>
<connections>
<segue destination="y3J-O2-WqL" kind="modal" id="G5i-bh-QnE"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HmI-tW-WbV">
<rect key="frame" x="256" y="246" width="32" height="30"/>
<state key="normal" title="Next"/>
<connections>
<segue destination="hlW-wj-deM" kind="push" id="yrf-ff-29I"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<navigationItem key="navigationItem" id="AKs-FM-kGB"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Mdf-28-RBY" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1293" y="2540"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="VfI-nO-SgE">
<objects>
<navigationController id="y3J-O2-WqL" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="jV9-XG-vEb">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="7mY-x7-hX8" kind="relationship" relationship="rootViewController" id="Lt0-ET-TZ2"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="YTj-px-FXl" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1827" y="1704"/>
</scene>
<!--View Controller-->
<scene sceneID="Aed-36-fyW">
<objects>
<viewController id="7mY-x7-hX8" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="0hg-2n-l82"/>
<viewControllerLayoutGuide type="bottom" id="Xbn-Xc-I4H"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="zmj-nX-cWj">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zkA-17-PR4">
<rect key="frame" x="259" y="290" width="46" height="30"/>
<state key="normal" title="Button"/>
<connections>
<segue destination="yFV-mZ-pXh" kind="push" id="XZa-zw-HlF"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<navigationItem key="navigationItem" id="TPf-vM-EB5"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="GFT-Vr-jdd" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2546" y="1704"/>
</scene>
</scenes>
<inferredMetricsTieBreakers>
<segue reference="yrf-ff-29I"/>
<segue reference="uib-gd-PHc"/>
</inferredMetricsTieBreakers>
</document>
47 changes: 47 additions & 0 deletions Example/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>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</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<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>
12 changes: 12 additions & 0 deletions Example/ViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// ViewController.swift
// Example
//
// Created by Rui Peres on 15/02/2016.
// Copyright © 2016 Velhotes. All rights reserved.
//

import UIKit

class ViewController: UIViewController { }

Loading