Skip to content

Commit

Permalink
Trying to align the buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
challenge authored and challenge committed Feb 7, 2015
1 parent b3eef04 commit 1a4b895
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 44 deletions.
51 changes: 15 additions & 36 deletions Snowman/Snowman/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6254" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="c2E-MI-n4R">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6247"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<scenes>
<!--View Controller-->
Expand All @@ -17,56 +16,36 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XEv-lF-QPY">
<rect key="frame" x="200" y="250" width="200" height="100"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iro-fa-wYo" customClass="FBLoginView">
<rect key="frame" x="207" y="480" width="200" height="100"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ufo-Be-bKK">
<rect key="frame" x="230" y="285" width="141" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="100" id="DeH-8t-TWT"/>
<constraint firstAttribute="width" constant="200" id="to7-md-OJ5"/>
<constraint firstAttribute="width" constant="141" id="tLk-Ta-f5h"/>
</constraints>
<state key="normal" title="Button">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="btnStartTapped:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="wFQ-sX-2Aw"/>
<segue destination="bKY-f2-878" kind="show" id="V3r-OI-gMf"/>
<segue destination="bKY-f2-878" kind="show" id="oRO-me-LZA"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iro-fa-wYo" customClass="FBLoginView">
<rect key="frame" x="200" y="480" width="200" height="100"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="EbE-ZB-2AQ">
<rect key="frame" x="21" y="9" width="563" height="454"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="A0D-CJ-tE0">
<rect key="frame" x="250" y="211" width="100" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="lg7-bT-XIY"/>
<constraint firstAttribute="width" constant="100" id="t1D-SI-F7t"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="EbE-ZB-2AQ" firstAttribute="trailing" secondItem="kh9-bI-dsS" secondAttribute="trailingMargin" id="2Vj-jE-qeK"/>
<constraint firstItem="EbE-ZB-2AQ" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leadingMargin" constant="5" id="Kxf-Yk-7yg"/>
<constraint firstItem="iro-fa-wYo" firstAttribute="top" secondItem="kh9-bI-dsS" secondAttribute="top" constant="480" id="MVe-UX-jvC"/>
<constraint firstItem="XEv-lF-QPY" firstAttribute="centerY" secondItem="kh9-bI-dsS" secondAttribute="centerY" id="Mhe-HV-KPE"/>
<constraint firstAttribute="bottom" secondItem="iro-fa-wYo" secondAttribute="bottom" constant="20" symbolic="YES" id="Sq0-Do-fw6"/>
<constraint firstItem="iro-fa-wYo" firstAttribute="trailing" secondItem="XEv-lF-QPY" secondAttribute="trailing" id="Tqg-SA-fvW"/>
<constraint firstItem="A0D-CJ-tE0" firstAttribute="centerY" secondItem="EbE-ZB-2AQ" secondAttribute="centerY" id="bRc-z4-fcQ"/>
<constraint firstItem="iro-fa-wYo" firstAttribute="leading" secondItem="XEv-lF-QPY" secondAttribute="leading" id="fJ3-6d-nLF"/>
<constraint firstItem="A0D-CJ-tE0" firstAttribute="centerX" secondItem="XEv-lF-QPY" secondAttribute="centerX" id="qIh-rs-HJL"/>
<constraint firstItem="A0D-CJ-tE0" firstAttribute="top" secondItem="jyV-Pf-zRb" secondAttribute="bottom" constant="191" id="qg2-Zz-Ua0"/>
<constraint firstItem="A0D-CJ-tE0" firstAttribute="centerX" secondItem="kh9-bI-dsS" secondAttribute="centerX" id="zac-o1-lwD"/>
<constraint firstItem="iro-fa-wYo" firstAttribute="top" secondItem="EbE-ZB-2AQ" secondAttribute="bottom" constant="17" id="zxo-cT-sW0"/>
<constraint firstAttribute="trailing" secondItem="iro-fa-wYo" secondAttribute="trailing" constant="193" id="4xu-XD-rsZ"/>
<constraint firstItem="Ufo-Be-bKK" firstAttribute="centerY" secondItem="kh9-bI-dsS" secondAttribute="centerY" id="FUn-Pq-FdT"/>
<constraint firstItem="iro-fa-wYo" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leading" constant="207" id="Ypm-tc-lph"/>
<constraint firstItem="Ufo-Be-bKK" firstAttribute="centerX" secondItem="kh9-bI-dsS" secondAttribute="centerX" id="b48-oZ-799"/>
<constraint firstItem="iro-fa-wYo" firstAttribute="top" secondItem="kh9-bI-dsS" secondAttribute="top" constant="480" id="ntz-Bs-AZS"/>
<constraint firstAttribute="bottom" secondItem="iro-fa-wYo" secondAttribute="bottom" constant="20" symbolic="YES" id="zFK-KK-eJ9"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="WYz-un-geK"/>
<connections>
<outlet property="backgroundImage" destination="EbE-ZB-2AQ" id="4VO-Jx-SmP"/>
<outlet property="btnStart" destination="XEv-lF-QPY" id="xAG-LJ-kk8"/>
<outlet property="crosshair" destination="A0D-CJ-tE0" id="fCT-r1-MUc"/>
<outlet property="btnStart" destination="Ufo-Be-bKK" id="trv-4A-EWa"/>
<outlet property="fbLoginView" destination="iro-fa-wYo" id="h1Z-uM-UCL"/>
<outlet property="mainView" destination="kh9-bI-dsS" id="xSA-aC-ckQ"/>
</connections>
Expand Down
19 changes: 11 additions & 8 deletions Snowman/Snowman/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ class ViewController: UIViewController,UIImagePickerControllerDelegate,UINavigat
@IBOutlet var fbLoginView : FBLoginView! //creating the outlet

@IBOutlet var mainView: UIView!
@IBOutlet weak var crosshair: UIImageView!
@IBOutlet weak var btnStart: UIButton!
@IBOutlet weak var backgroundImage: UIImageView!
//@IBOutlet weak var crosshair: UIImageView!
//@IBOutlet weak var backgroundImage: UIImageView!

@IBOutlet weak var btnStart: UIButton!
var array = []
override func viewDidLoad() {
super.viewDidLoad()
self.btnStart.hidden = true
self.backgroundImage.hidden = true
self.crosshair.hidden = true
//self.backgroundImage.hidden = true
//self.crosshair.hidden = true
//initiating LoginView
self.fbLoginView.delegate = self
//initiating permission levels (could be modified for photo permis sions etc.)
Expand All @@ -51,7 +51,7 @@ class ViewController: UIViewController,UIImagePickerControllerDelegate,UINavigat

}


/*
func createOverlayView() -> UIView{

//Initialize the overlay view
Expand All @@ -71,6 +71,7 @@ class ViewController: UIViewController,UIImagePickerControllerDelegate,UINavigat

return overlay
}
*/
/*
@IBAction func btnStartTapped(sender: AnyObject) {
//TESTING CODE
Expand Down Expand Up @@ -108,6 +109,7 @@ class ViewController: UIViewController,UIImagePickerControllerDelegate,UINavigat
}
*/
/*New method using AVCaptureSession*/
/*
func openCamera(){
var error : NSError?
var session : AVCaptureSession = AVCaptureSession()
Expand Down Expand Up @@ -161,11 +163,12 @@ class ViewController: UIViewController,UIImagePickerControllerDelegate,UINavigat
alertView.show()
}
}
*/
/*
Responsible for face detection.
@author Towhid Absar <[email protected]>
*/
/*
func imagePickerController(picker: UIImagePickerController!, didFinishPickingMediaWithInfo info: NSDictionary) {
//picks the image from the picker controller.
let photo = info[UIImagePickerControllerOriginalImage] as UIImage
Expand Down Expand Up @@ -272,7 +275,7 @@ class ViewController: UIViewController,UIImagePickerControllerDelegate,UINavigat

}


*/



Expand Down

0 comments on commit 1a4b895

Please sign in to comment.