فهرست منبع

Created files for the day prices list.

Iñigo Valentin 9 سال پیش
والد
کامیت
316a52aa15
3فایلهای تغییر یافته به همراه197 افزوده شده و 0 حذف شده
  1. 8 0
      app.xcodeproj/project.pbxproj
  2. 88 0
      app/RowLablancaDay.swift
  3. 101 0
      app/RowLablancaDay.xib

+ 8 - 0
app.xcodeproj/project.pbxproj

@@ -15,6 +15,8 @@
 		931AA58B1E1DA911003A2290 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 931AA58A1E1DA910003A2290 /* CoreData.framework */; };
 		931AA5AE1E218D0E003A2290 /* Entry.xib in Resources */ = {isa = PBXBuildFile; fileRef = 931AA5AD1E218D0D003A2290 /* Entry.xib */; };
 		931AA5B01E219006003A2290 /* RowHomePastActivities.xib in Resources */ = {isa = PBXBuildFile; fileRef = 931AA5AF1E219006003A2290 /* RowHomePastActivities.xib */; };
+		9326C4F41EA51C39007DF2A4 /* RowLablancaDay.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9326C4F31EA51C39007DF2A4 /* RowLablancaDay.xib */; };
+		9326C4F61EA5279D007DF2A4 /* RowLablancaDay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9326C4F51EA5279D007DF2A4 /* RowLablancaDay.swift */; };
 		93294FF81E336FA000FDAF50 /* Entry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93294FF71E336FA000FDAF50 /* Entry.swift */; };
 		93294FFA1E337D0D00FDAF50 /* RowHomePastActivities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93294FF91E337D0D00FDAF50 /* RowHomePastActivities.swift */; };
 		935892D01E493C2300E1CD5F /* UIImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 935892CF1E493C2300E1CD5F /* UIImageView.swift */; };
@@ -62,6 +64,8 @@
 		931AA58A1E1DA910003A2290 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
 		931AA5AD1E218D0D003A2290 /* Entry.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = Entry.xib; sourceTree = "<group>"; };
 		931AA5AF1E219006003A2290 /* RowHomePastActivities.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RowHomePastActivities.xib; sourceTree = "<group>"; };
+		9326C4F31EA51C39007DF2A4 /* RowLablancaDay.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RowLablancaDay.xib; sourceTree = "<group>"; };
+		9326C4F51EA5279D007DF2A4 /* RowLablancaDay.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RowLablancaDay.swift; sourceTree = "<group>"; };
 		93294FF71E336FA000FDAF50 /* Entry.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Entry.swift; sourceTree = "<group>"; };
 		93294FF91E337D0D00FDAF50 /* RowHomePastActivities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RowHomePastActivities.swift; sourceTree = "<group>"; };
 		935892CF1E493C2300E1CD5F /* UIImageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIImageView.swift; sourceTree = "<group>"; };
@@ -178,6 +182,8 @@
 				936966F01E984B5000A11055 /* RowAlbum.swift */,
 				938D211C1EA2275300C47EC3 /* LablancaView.xib */,
 				938D211E1EA2306300C47EC3 /* LablancaView.swift */,
+				9326C4F31EA51C39007DF2A4 /* RowLablancaDay.xib */,
+				9326C4F51EA5279D007DF2A4 /* RowLablancaDay.swift */,
 			);
 			path = app;
 			sourceTree = "<group>";
@@ -264,6 +270,7 @@
 				93B84BA41D9C31AB006C0F67 /* Assets.xcassets in Resources */,
 				935D6E2D1E8678B700CED3A1 /* GalleryView.xib in Resources */,
 				93BAD2EE1E585578009DF853 /* RowHomeBlog.xib in Resources */,
+				9326C4F41EA51C39007DF2A4 /* RowLablancaDay.xib in Resources */,
 				935D6E311E867C5E00CED3A1 /* RowGallery.xib in Resources */,
 				93B84B9F1D9C31AB006C0F67 /* Main.storyboard in Resources */,
 				93D9EA6C1DE3498500089002 /* HomeView.xib in Resources */,
@@ -285,6 +292,7 @@
 				93D9EA6A1DE3491100089002 /* HomeView.swift in Sources */,
 				93BEB6D21E7E878300C68DE5 /* PostViewController.swift in Sources */,
 				93BAD2F81E586741009DF853 /* RowHomeSocial.swift in Sources */,
+				9326C4F61EA5279D007DF2A4 /* RowLablancaDay.swift in Sources */,
 				93BAD2F01E585662009DF853 /* RowHomeBlog.swift in Sources */,
 				93294FFA1E337D0D00FDAF50 /* RowHomePastActivities.swift in Sources */,
 				93B5C01A1E872B4B0069BFF8 /* RowHomeGallery.swift in Sources */,

+ 88 - 0
app/RowLablancaDay.swift

@@ -0,0 +1,88 @@
+// Copyright (C) 2016 Inigo Valentin
+//
+// This file is part of the Gasteizko Margolariak IOS app.
+//
+// The Gasteizko Margolariak IOS app is free software: you can
+// redistribute it and/or modify it under the terms of the
+// GNU General Public License as published by the Free Software
+// Foundation, either version 3 of the License, or (at your
+// option) any later version.
+//
+// The Gasteizko Margolariak IOS app is distributed in the
+// hope that it will be useful, but WITHOUT ANY WARRANTY;
+// without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
+// Public License for more details.
+//
+// You should have received a copy of the GNU General Public
+// License along with the Gasteizko Margolariak IOS app.
+// If not, see <http://www.gnu.org/licenses/>.
+
+import Foundation
+import UIKit
+
+/**
+Extension of UIView to be formatted as sections.
+*/
+@IBDesignable class RowLablancaDay: UIView {
+	
+	// Outlets
+	@IBOutlet weak var container: UIView!
+	@IBOutlet weak var number: UILabel!
+	@IBOutlet weak var month: UILabel!
+	@IBOutlet weak var name: UILabel!
+	@IBOutlet weak var price: UILabel!
+	
+	
+	
+	
+	/**
+	Default constructor
+	*/
+	required init?(coder aDecoder: NSCoder) {
+		super.init(coder: aDecoder)
+	}
+	
+	/**
+	Loads the view from the xib with the same name as the class.
+	*/
+	private func loadViewFromNib() {
+		let bundle = Bundle(for: type(of: self))
+		let nib = UINib(nibName: String(describing: type(of: self)), bundle: bundle)
+		nib.instantiate(withOwner: self, options: nil).first as! UIView
+		
+		self.frame = self.bounds
+		self.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+		self.translatesAutoresizingMaskIntoConstraints = true
+		
+		container.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+		container.translatesAutoresizingMaskIntoConstraints = true
+		
+		container.frame = self.bounds
+		self.addSubview(container)
+		
+	}
+	
+	/**
+	Default constructor.
+	:param: s Custom identifier
+	:param: i Custom identifier
+	*/
+	init(s: String, i: Int) {
+		NSLog(":ROWLABLANCADAY:DEBUG: Init \(s), \(i)")
+		
+		super.init(frame: CGRect(x: 0, y: 0, width: 0, height: 0))
+		loadViewFromNib()
+		self.frame = self.bounds
+		self.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+		self.translatesAutoresizingMaskIntoConstraints = true
+	}
+	
+	/**
+	Default constructor for the interface builder
+	*/
+	override init(frame: CGRect){
+		super.init(frame: frame)
+	}
+	
+}

+ 101 - 0
app/RowLablancaDay.xib

@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina3_5" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
+        <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="RowLablancaDay" customModule="app">
+            <connections>
+                <outlet property="container" destination="gfH-i8-jRE" id="wgl-1w-I1S"/>
+                <outlet property="month" destination="5Qr-iE-jB1" id="N9E-Yg-Dx5"/>
+                <outlet property="name" destination="Bq6-IK-wMo" id="f8D-Fk-GR1"/>
+                <outlet property="number" destination="fyr-yz-Mdw" id="tbR-wz-NFB"/>
+                <outlet property="price" destination="EBl-yy-csC" id="iW2-CE-0GB"/>
+            </connections>
+        </placeholder>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="RowLablancaDay" customModule="app">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gfH-i8-jRE" userLabel="Container">
+                    <rect key="frame" x="0.0" y="197.5" width="320" height="85"/>
+                    <subviews>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="25" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fyr-yz-Mdw" userLabel="Number">
+                            <rect key="frame" x="0.0" y="0.0" width="60" height="50"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="50" id="B8H-ex-mmQ"/>
+                                <constraint firstAttribute="width" constant="60" id="VZe-Ub-0PF"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="boldSystem" pointSize="35"/>
+                            <nil key="textColor"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Agosto" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5Qr-iE-jB1" userLabel="Month">
+                            <rect key="frame" x="0.0" y="50" width="80" height="24"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="80" id="RZL-5X-uNW"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
+                            <nil key="textColor"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Margo Txiki" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bq6-IK-wMo" userLabel="Name">
+                            <rect key="frame" x="80" y="0.0" width="160" height="30"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="30" id="INd-c0-4oI"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="italicSystem" pointSize="17"/>
+                            <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="60E" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EBl-yy-csC" userLabel="Price">
+                            <rect key="frame" x="240" y="0.0" width="70" height="85"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="70" id="E4j-HZ-ldc"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="boldSystem" pointSize="35"/>
+                            <color key="textColor" red="0.0" green="0.47058823529999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jGw-ai-rD9" userLabel="BSeparator">
+                            <rect key="frame" x="16" y="79" width="288" height="1"/>
+                            <color key="backgroundColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="1" id="J4D-Ti-cxq"/>
+                            </constraints>
+                        </view>
+                    </subviews>
+                    <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                    <constraints>
+                        <constraint firstItem="EBl-yy-csC" firstAttribute="height" secondItem="gfH-i8-jRE" secondAttribute="height" id="0Y2-3c-XrT"/>
+                        <constraint firstItem="fyr-yz-Mdw" firstAttribute="leading" secondItem="gfH-i8-jRE" secondAttribute="leading" id="35s-RT-Oj6"/>
+                        <constraint firstItem="Bq6-IK-wMo" firstAttribute="top" secondItem="gfH-i8-jRE" secondAttribute="top" id="8jB-bt-jc1"/>
+                        <constraint firstAttribute="trailing" secondItem="Bq6-IK-wMo" secondAttribute="trailing" constant="80" id="EQ4-Hb-Tak"/>
+                        <constraint firstItem="fyr-yz-Mdw" firstAttribute="top" secondItem="gfH-i8-jRE" secondAttribute="top" id="J4i-zA-a0P"/>
+                        <constraint firstItem="5Qr-iE-jB1" firstAttribute="leading" secondItem="gfH-i8-jRE" secondAttribute="leading" id="NIm-B3-jCe"/>
+                        <constraint firstItem="jGw-ai-rD9" firstAttribute="width" secondItem="gfH-i8-jRE" secondAttribute="width" multiplier="0.9" id="PFQ-Ss-B4n"/>
+                        <constraint firstItem="5Qr-iE-jB1" firstAttribute="top" secondItem="fyr-yz-Mdw" secondAttribute="bottom" id="SK6-qC-aSb"/>
+                        <constraint firstItem="jGw-ai-rD9" firstAttribute="centerX" secondItem="gfH-i8-jRE" secondAttribute="centerX" id="cXu-Ex-OPq"/>
+                        <constraint firstAttribute="bottom" secondItem="EBl-yy-csC" secondAttribute="bottom" id="eKu-rV-ta5"/>
+                        <constraint firstAttribute="bottom" secondItem="jGw-ai-rD9" secondAttribute="bottom" constant="5" id="iXz-7T-gxt"/>
+                        <constraint firstItem="Bq6-IK-wMo" firstAttribute="leading" secondItem="fyr-yz-Mdw" secondAttribute="trailing" constant="20" id="p56-bu-QTp"/>
+                        <constraint firstAttribute="height" constant="85" id="r9E-HA-2EY"/>
+                        <constraint firstAttribute="trailing" secondItem="EBl-yy-csC" secondAttribute="trailing" constant="10" id="r9k-aS-TeZ"/>
+                    </constraints>
+                </view>
+            </subviews>
+            <constraints>
+                <constraint firstItem="gfH-i8-jRE" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" id="YtF-gj-uYr"/>
+                <constraint firstItem="gfH-i8-jRE" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="mOr-Je-9MW"/>
+                <constraint firstItem="gfH-i8-jRE" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="ocq-OY-EmP"/>
+            </constraints>
+        </view>
+    </objects>
+</document>