Skip to content

Commit

Permalink
converted ContactList ViewController
Browse files Browse the repository at this point in the history
  • Loading branch information
timuber committed Jan 5, 2016
1 parent a4cf3b8 commit c0f2647
Show file tree
Hide file tree
Showing 9 changed files with 684 additions and 23 deletions.
12 changes: 12 additions & 0 deletions SampleAppSwift/SampleAppSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
/* Begin PBXBuildFile section */
824512211C3B76A6000EF52E /* GroupAddViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 824512201C3B76A6000EF52E /* GroupAddViewController.swift */; };
824512231C3B76C9000EF52E /* ContactListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 824512221C3B76C9000EF52E /* ContactListViewController.swift */; };
824512251C3BCC6E000EF52E /* ContactViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 824512241C3BCC6E000EF52E /* ContactViewController.swift */; };
824512271C3BF40A000EF52E /* ContactEditViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 824512261C3BF40A000EF52E /* ContactEditViewController.swift */; };
824512291C3BF6E4000EF52E /* ProfileImagePickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 824512281C3BF6E4000EF52E /* ProfileImagePickerViewController.swift */; };
82B39FF81C3A5B4600D4F23F /* CustomNavBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82B39FF71C3A5B4600D4F23F /* CustomNavBar.swift */; };
82B39FFD1C3A9B7300D4F23F /* ContactInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82B39FFC1C3A9B7300D4F23F /* ContactInfoView.swift */; };
82B39FFF1C3AA42E00D4F23F /* MasterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82B39FFE1C3AA42E00D4F23F /* MasterViewController.swift */; };
Expand All @@ -28,6 +31,9 @@
/* Begin PBXFileReference section */
824512201C3B76A6000EF52E /* GroupAddViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GroupAddViewController.swift; sourceTree = "<group>"; };
824512221C3B76C9000EF52E /* ContactListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContactListViewController.swift; sourceTree = "<group>"; };
824512241C3BCC6E000EF52E /* ContactViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContactViewController.swift; sourceTree = "<group>"; };
824512261C3BF40A000EF52E /* ContactEditViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContactEditViewController.swift; sourceTree = "<group>"; };
824512281C3BF6E4000EF52E /* ProfileImagePickerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProfileImagePickerViewController.swift; sourceTree = "<group>"; };
82B39FF71C3A5B4600D4F23F /* CustomNavBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomNavBar.swift; sourceTree = "<group>"; };
82B39FFC1C3A9B7300D4F23F /* ContactInfoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContactInfoView.swift; sourceTree = "<group>"; };
82B39FFE1C3AA42E00D4F23F /* MasterViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MasterViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -97,6 +103,9 @@
82B3A0021C3AA70D00D4F23F /* AddressBookViewController.swift */,
824512201C3B76A6000EF52E /* GroupAddViewController.swift */,
824512221C3B76C9000EF52E /* ContactListViewController.swift */,
824512241C3BCC6E000EF52E /* ContactViewController.swift */,
824512261C3BF40A000EF52E /* ContactEditViewController.swift */,
824512281C3BF6E4000EF52E /* ProfileImagePickerViewController.swift */,
);
path = Controller;
sourceTree = "<group>";
Expand Down Expand Up @@ -201,12 +210,15 @@
buildActionMask = 2147483647;
files = (
824512211C3B76A6000EF52E /* GroupAddViewController.swift in Sources */,
824512251C3BCC6E000EF52E /* ContactViewController.swift in Sources */,
824512291C3BF6E4000EF52E /* ProfileImagePickerViewController.swift in Sources */,
82B3A0031C3AA70D00D4F23F /* AddressBookViewController.swift in Sources */,
82D0A1111C39C9B600DC41FB /* GroupRecord.swift in Sources */,
82B3A0011C3AA6EE00D4F23F /* RegisterViewController.swift in Sources */,
82D0A10D1C39ADCC00DC41FB /* NIKApiInvoker.swift in Sources */,
82D0A0F41C39986000DC41FB /* AppDelegate.swift in Sources */,
824512231C3B76C9000EF52E /* ContactListViewController.swift in Sources */,
824512271C3BF40A000EF52E /* ContactEditViewController.swift in Sources */,
82B39FFD1C3A9B7300D4F23F /* ContactInfoView.swift in Sources */,
82D0A10F1C39B9BA00DC41FB /* NIKFile.swift in Sources */,
82B39FFF1C3AA42E00D4F23F /* MasterViewController.swift in Sources */,
Expand Down
Binary file not shown.
21 changes: 14 additions & 7 deletions SampleAppSwift/SampleAppSwift/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -285,23 +285,30 @@
<color key="backgroundColor" red="0.99607843139999996" green="0.99607843139999996" blue="0.99607843139999996" alpha="1" colorSpace="calibratedRGB"/>
<color key="separatorColor" red="0.73788265310000001" green="0.73788265310000001" blue="0.73788265310000001" alpha="1" colorSpace="calibratedRGB"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="contactListTableViewCell" id="Ood-Zi-fWQ">
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="contactListTableViewCell" textLabel="4Sp-TV-ZfA" style="IBUITableViewCellStyleDefault" id="Ood-Zi-fWQ">
<rect key="frame" x="0.0" y="22" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Ood-Zi-fWQ" id="hgD-oM-iQY">
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="4Sp-TV-ZfA">
<rect key="frame" x="15" y="0.0" width="290" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<color key="backgroundColor" red="0.99607843139999996" green="0.99607843139999996" blue="0.99607843139999996" alpha="1" colorSpace="calibratedRGB"/>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="crL-an-5dp" id="E0b-rZ-sX5"/>
<outlet property="delegate" destination="crL-an-5dp" id="cT7-Ja-1Tg"/>
</connections>
</tableView>
<connections>
<outlet property="contactListTableView" destination="x5t-pn-2gG" id="wM8-XN-LGR"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="zwT-B4-IZd" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
Expand All @@ -310,7 +317,7 @@
<!--Profile Image Picker View Controller-->
<scene sceneID="9wh-ly-p9q">
<objects>
<viewController storyboardIdentifier="ProfileImagePickerViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="AVr-4i-Laq" customClass="ProfileImagePickerViewController" sceneMemberID="viewController">
<viewController storyboardIdentifier="ProfileImagePickerViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="AVr-4i-Laq" customClass="ProfileImagePickerViewController" customModule="SampleAppSwift" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="cPl-Qd-fvB">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
Expand Down Expand Up @@ -369,7 +376,7 @@
<!--Contact View Controller-->
<scene sceneID="A4e-RP-iXT">
<objects>
<viewController storyboardIdentifier="ContactViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="nZ1-MJ-dg9" customClass="ContactViewController" sceneMemberID="viewController">
<viewController storyboardIdentifier="ContactViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="nZ1-MJ-dg9" customClass="ContactViewController" customModule="SampleAppSwift" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="cm7-8q-xcW">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
Expand All @@ -393,7 +400,7 @@
<!--Contact Edit View Controller-->
<scene sceneID="QGc-5m-cjf">
<objects>
<viewController storyboardIdentifier="ContactEditViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="bW0-ZS-45r" customClass="ContactEditViewController" sceneMemberID="viewController">
<viewController storyboardIdentifier="ContactEditViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="bW0-ZS-45r" customClass="ContactEditViewController" customModule="SampleAppSwift" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="WH2-rg-rf9">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//
// ContactEditViewController.swift
// SampleAppSwift
//
// Created by Timur Umayev on 1/5/16.
// Copyright © 2016 dreamfactory. All rights reserved.
//

import UIKit

class ContactEditViewController: UIViewController {
@IBOutlet weak var contactEditScrollView: UIScrollView!

weak var contactViewController: ContactViewController?

// the contact being looked at
var contactRecord: ContactRecord!

// set when editing an existing contact
// list of contactinfo records
var contactDetails: [ContactDetailRecord]!

// set when creating a new contact
// id of the group the contact is being created in
var contactGroupId: NSNumber!

override func viewDidLoad() {
super.viewDidLoad()
}
}
Loading

0 comments on commit c0f2647

Please sign in to comment.