git.iko.soy/dashared/GDproject
on master help sign in
created profile tab. needs great modifications and decomposition
173e0dbDarya Rednikina
GDproject.xcodeproj/project.pbxproj+18−6
@@ -7,6 +7,9 @@
7 objects = {
7 objects = {
8
8
9/* Begin PBXBuildFile section */
9/* Begin PBXBuildFile section */
10+ 125BD57D22171D2A008A3575 /* ProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125BD57C22171D2A008A3575 /* ProfileViewController.swift */; };
11+ 125BD57F22171D73008A3575 /* Extentions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125BD57E22171D73008A3575 /* Extentions.swift */; };
12+ 125BD5812217314A008A3575 /* NewsVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125BD5802217314A008A3575 /* NewsVC.swift */; };
10 12E36D9C221424EA006FCDD7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E36D9B221424EA006FCDD7 /* AppDelegate.swift */; };
13 12E36D9C221424EA006FCDD7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E36D9B221424EA006FCDD7 /* AppDelegate.swift */; };
11 12E36D9E221424EA006FCDD7 /* NewsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E36D9D221424EA006FCDD7 /* NewsController.swift */; };
14 12E36D9E221424EA006FCDD7 /* NewsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E36D9D221424EA006FCDD7 /* NewsController.swift */; };
12 12E36DA1221424EA006FCDD7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 12E36D9F221424EA006FCDD7 /* Main.storyboard */; };
15 12E36DA1221424EA006FCDD7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 12E36D9F221424EA006FCDD7 /* Main.storyboard */; };
@@ -52,6 +55,9 @@
52/* End PBXCopyFilesBuildPhase section */
55/* End PBXCopyFilesBuildPhase section */
53
56
54/* Begin PBXFileReference section */
57/* Begin PBXFileReference section */
58+ 125BD57C22171D2A008A3575 /* ProfileViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileViewController.swift; sourceTree = "<group>"; };
59+ 125BD57E22171D73008A3575 /* Extentions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extentions.swift; sourceTree = "<group>"; };
60+ 125BD5802217314A008A3575 /* NewsVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewsVC.swift; sourceTree = "<group>"; };
55 12E36D98221424EA006FCDD7 /* GDproject.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GDproject.app; sourceTree = BUILT_PRODUCTS_DIR; };
61 12E36D98221424EA006FCDD7 /* GDproject.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GDproject.app; sourceTree = BUILT_PRODUCTS_DIR; };
56 12E36D9B221424EA006FCDD7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
62 12E36D9B221424EA006FCDD7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
57 12E36D9D221424EA006FCDD7 /* NewsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewsController.swift; sourceTree = "<group>"; };
63 12E36D9D221424EA006FCDD7 /* NewsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewsController.swift; sourceTree = "<group>"; };
@@ -118,6 +124,8 @@
118 children = (
124 children = (
119 12E36DCF22145923006FCDD7 /* Controller */,
125 12E36DCF22145923006FCDD7 /* Controller */,
120 12E36DCD22144756006FCDD7 /* Constants.swift */,
126 12E36DCD22144756006FCDD7 /* Constants.swift */,
127+ 125BD57E22171D73008A3575 /* Extentions.swift */,
128+ 12E36DD422156559006FCDD7 /* MyStackView.swift */,
121 12E36DBB2214402B006FCDD7 /* Supporting files */,
129 12E36DBB2214402B006FCDD7 /* Supporting files */,
122 12E36DBA2214401B006FCDD7 /* Simple model */,
130 12E36DBA2214401B006FCDD7 /* Simple model */,
123 12E36D9F221424EA006FCDD7 /* Main.storyboard */,
131 12E36D9F221424EA006FCDD7 /* Main.storyboard */,
@@ -148,13 +156,8 @@
148 12E36DCF22145923006FCDD7 /* Controller */ = {
156 12E36DCF22145923006FCDD7 /* Controller */ = {
149 isa = PBXGroup;
157 isa = PBXGroup;
150 children = (
158 children = (
151− 12E36DD422156559006FCDD7 /* MyStackView.swift */,
159+ 125BD57C22171D2A008A3575 /* ProfileViewController.swift */,
152− 12E36DD022148122006FCDD7 /* FullPostController.swift */,
153− 12E36DC522144266006FCDD7 /* HeaderNewsChannels.swift */,
154− 12E36DC722144374006FCDD7 /* ChannelsController.swift */,
155− 12E36D9D221424EA006FCDD7 /* NewsController.swift */,
156 12E36DD322156519006FCDD7 /* News */,
160 12E36DD322156519006FCDD7 /* News */,
157− 12E36DC922144635006FCDD7 /* NewPostViewController.swift */,
158 );
161 );
159 path = Controller;
162 path = Controller;
160 sourceTree = "<group>";
163 sourceTree = "<group>";
@@ -162,6 +165,12 @@
162 12E36DD322156519006FCDD7 /* News */ = {
165 12E36DD322156519006FCDD7 /* News */ = {
163 isa = PBXGroup;
166 isa = PBXGroup;
164 children = (
167 children = (
168+ 12E36DC922144635006FCDD7 /* NewPostViewController.swift */,
169+ 12E36DD022148122006FCDD7 /* FullPostController.swift */,
170+ 12E36DC522144266006FCDD7 /* HeaderNewsChannels.swift */,
171+ 12E36DC722144374006FCDD7 /* ChannelsController.swift */,
172+ 12E36D9D221424EA006FCDD7 /* NewsController.swift */,
173+ 125BD5802217314A008A3575 /* NewsVC.swift */,
165 12E36DCB22144725006FCDD7 /* PostViewCell.swift */,
174 12E36DCB22144725006FCDD7 /* PostViewCell.swift */,
166 );
175 );
167 path = News;
176 path = News;
@@ -249,12 +258,15 @@
249 12E36DD522156559006FCDD7 /* MyStackView.swift in Sources */,
258 12E36DD522156559006FCDD7 /* MyStackView.swift in Sources */,
250 12E36DC822144374006FCDD7 /* ChannelsController.swift in Sources */,
259 12E36DC822144374006FCDD7 /* ChannelsController.swift in Sources */,
251 12E36DB922144016006FCDD7 /* User.swift in Sources */,
260 12E36DB922144016006FCDD7 /* User.swift in Sources */,
261+ 125BD5812217314A008A3575 /* NewsVC.swift in Sources */,
252 12E36DB72214400A006FCDD7 /* Post.swift in Sources */,
262 12E36DB72214400A006FCDD7 /* Post.swift in Sources */,
253 12E36DCA22144635006FCDD7 /* NewPostViewController.swift in Sources */,
263 12E36DCA22144635006FCDD7 /* NewPostViewController.swift in Sources */,
254 12E36D9E221424EA006FCDD7 /* NewsController.swift in Sources */,
264 12E36D9E221424EA006FCDD7 /* NewsController.swift in Sources */,
255 12E36DC622144266006FCDD7 /* HeaderNewsChannels.swift in Sources */,
265 12E36DC622144266006FCDD7 /* HeaderNewsChannels.swift in Sources */,
256 12E36DCC22144725006FCDD7 /* PostViewCell.swift in Sources */,
266 12E36DCC22144725006FCDD7 /* PostViewCell.swift in Sources */,
267+ 125BD57F22171D73008A3575 /* Extentions.swift in Sources */,
257 12E36DD122148122006FCDD7 /* FullPostController.swift in Sources */,
268 12E36DD122148122006FCDD7 /* FullPostController.swift in Sources */,
269+ 125BD57D22171D2A008A3575 /* ProfileViewController.swift in Sources */,
258 12E36D9C221424EA006FCDD7 /* AppDelegate.swift in Sources */,
270 12E36D9C221424EA006FCDD7 /* AppDelegate.swift in Sources */,
259 12E36DCE22144756006FCDD7 /* Constants.swift in Sources */,
271 12E36DCE22144756006FCDD7 /* Constants.swift in Sources */,
260 );
272 );
GDproject/Base.lproj/Main.storyboard+154−7
@@ -1,5 +1,5 @@
1<?xml version="1.0" encoding="UTF-8"?>
1<?xml version="1.0" encoding="UTF-8"?>
2−<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="NuV-ZG-ld2">
2+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="IeP-4W-8LT">
3 <device id="retina4_7" orientation="portrait">
3 <device id="retina4_7" orientation="portrait">
4 <adaptation id="fullscreen"/>
4 <adaptation id="fullscreen"/>
5 </device>
5 </device>
@@ -7,6 +7,7 @@
7 <deployment identifier="iOS"/>
7 <deployment identifier="iOS"/>
8 <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
8 <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
9 <capability name="Safe area layout guides" minToolsVersion="9.0"/>
9 <capability name="Safe area layout guides" minToolsVersion="9.0"/>
10+ <capability name="Stack View standard spacing" minToolsVersion="9.0"/>
10 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
11 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
11 </dependencies>
12 </dependencies>
12 <scenes>
13 <scenes>
@@ -19,7 +20,7 @@
19 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
20 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
20 <subviews>
21 <subviews>
21 <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="bdn-EE-6KU">
22 <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="bdn-EE-6KU">
22− <rect key="frame" x="0.0" y="116" width="375" height="551"/>
23+ <rect key="frame" x="0.0" y="116" width="375" height="502"/>
23 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
24 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
24 </tableView>
25 </tableView>
25 </subviews>
26 </subviews>
@@ -39,7 +40,115 @@
39 </viewController>
40 </viewController>
40 <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
41 <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
41 </objects>
42 </objects>
42− <point key="canvasLocation" x="1076" y="132.68365817091455"/>
43+ <point key="canvasLocation" x="2015.2" y="132.68365817091455"/>
44+ </scene>
45+ <!--Profile View Controller-->
46+ <scene sceneID="rQ6-TM-V7T">
47+ <objects>
48+ <viewController storyboardIdentifier="ProfileViewController" id="R4D-Ao-uvG" customClass="ProfileViewController" customModule="GDproject" customModuleProvider="target" sceneMemberID="viewController">
49+ <view key="view" contentMode="scaleToFill" id="N0n-wL-Y5j">
50+ <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
51+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
52+ <subviews>
53+ <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="cay-ea-rTl">
54+ <rect key="frame" x="0.0" y="116" width="375" height="502"/>
55+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
56+ <view key="tableHeaderView" contentMode="scaleToFill" id="kFZ-3c-OFY">
57+ <rect key="frame" x="0.0" y="0.0" width="375" height="200"/>
58+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
59+ <subviews>
60+ <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="93Q-rB-JKk">
61+ <rect key="frame" x="16" y="16" width="120" height="120"/>
62+ <constraints>
63+ <constraint firstAttribute="width" constant="120" id="3Xq-K8-0jL"/>
64+ <constraint firstAttribute="height" constant="120" id="d83-z4-p3p"/>
65+ </constraints>
66+ </imageView>
67+ <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="HD1-1N-Rae">
68+ <rect key="frame" x="156" y="16" width="203" height="120"/>
69+ <subviews>
70+ <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="OJ4-19-keW">
71+ <rect key="frame" x="0.0" y="0.0" width="203" height="49"/>
72+ <subviews>
73+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vff-nz-u6X">
74+ <rect key="frame" x="0.0" y="0.0" width="203" height="21.5"/>
75+ <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
76+ <nil key="textColor"/>
77+ <nil key="highlightedColor"/>
78+ </label>
79+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="umX-IO-ePK">
80+ <rect key="frame" x="0.0" y="29.5" width="203" height="19.5"/>
81+ <fontDescription key="fontDescription" type="system" pointSize="16"/>
82+ <nil key="textColor"/>
83+ <nil key="highlightedColor"/>
84+ </label>
85+ </subviews>
86+ </stackView>
87+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ypY-U6-bJm">
88+ <rect key="frame" x="0.0" y="103" width="203" height="17"/>
89+ <fontDescription key="fontDescription" type="system" pointSize="14"/>
90+ <nil key="textColor"/>
91+ <nil key="highlightedColor"/>
92+ </label>
93+ </subviews>
94+ <constraints>
95+ <constraint firstAttribute="height" constant="120" id="8vI-3o-mkr"/>
96+ </constraints>
97+ </stackView>
98+ <stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="hFb-Uj-GwE">
99+ <rect key="frame" x="16" y="154" width="343" height="30"/>
100+ <subviews>
101+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vCL-BI-I2h">
102+ <rect key="frame" x="0.0" y="0.0" width="35.5" height="30"/>
103+ <fontDescription key="fontDescription" type="system" pointSize="14"/>
104+ <nil key="textColor"/>
105+ <nil key="highlightedColor"/>
106+ </label>
107+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yir-N6-Q6f">
108+ <rect key="frame" x="297" y="0.0" width="46" height="30"/>
109+ <state key="normal" title="Button"/>
110+ </button>
111+ </subviews>
112+ </stackView>
113+ </subviews>
114+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
115+ <constraints>
116+ <constraint firstItem="93Q-rB-JKk" firstAttribute="top" secondItem="kFZ-3c-OFY" secondAttribute="top" constant="16" id="5r9-SM-GHQ"/>
117+ <constraint firstItem="hFb-Uj-GwE" firstAttribute="leading" secondItem="kFZ-3c-OFY" secondAttribute="leading" constant="16" id="HWn-2I-NvS"/>
118+ <constraint firstAttribute="trailing" secondItem="hFb-Uj-GwE" secondAttribute="trailing" constant="16" id="MHn-bJ-vkd"/>
119+ <constraint firstItem="HD1-1N-Rae" firstAttribute="leading" secondItem="93Q-rB-JKk" secondAttribute="trailing" constant="20" id="Zmg-ZS-Eyy"/>
120+ <constraint firstItem="93Q-rB-JKk" firstAttribute="leading" secondItem="kFZ-3c-OFY" secondAttribute="leading" constant="16" id="f3K-RA-5qe"/>
121+ <constraint firstAttribute="trailing" secondItem="HD1-1N-Rae" secondAttribute="trailing" constant="16" id="qT1-ct-8ed"/>
122+ <constraint firstAttribute="bottom" secondItem="hFb-Uj-GwE" secondAttribute="bottom" constant="16" id="ucS-yd-kWf"/>
123+ <constraint firstItem="HD1-1N-Rae" firstAttribute="top" secondItem="kFZ-3c-OFY" secondAttribute="top" constant="16" id="zZe-Oe-Okw"/>
124+ </constraints>
125+ </view>
126+ </tableView>
127+ </subviews>
128+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
129+ <constraints>
130+ <constraint firstItem="cay-ea-rTl" firstAttribute="leading" secondItem="HGw-oo-OLI" secondAttribute="leading" id="37r-TE-87A"/>
131+ <constraint firstItem="HGw-oo-OLI" firstAttribute="trailing" secondItem="cay-ea-rTl" secondAttribute="trailing" id="LF0-J4-EyT"/>
132+ <constraint firstItem="cay-ea-rTl" firstAttribute="top" secondItem="HGw-oo-OLI" secondAttribute="top" id="Me6-du-vNl"/>
133+ <constraint firstItem="HGw-oo-OLI" firstAttribute="bottom" secondItem="cay-ea-rTl" secondAttribute="bottom" id="YBy-bu-FUY"/>
134+ </constraints>
135+ <viewLayoutGuide key="safeArea" id="HGw-oo-OLI"/>
136+ </view>
137+ <navigationItem key="navigationItem" id="jN7-hp-Zl8"/>
138+ <connections>
139+ <outlet property="facultyLabel" destination="ypY-U6-bJm" id="88V-uI-Rt8"/>
140+ <outlet property="nameLabel" destination="umX-IO-ePK" id="bY9-BV-XG2"/>
141+ <outlet property="newMessageButton" destination="yir-N6-Q6f" id="B3W-6Z-FLK"/>
142+ <outlet property="placeLabel" destination="vCL-BI-I2h" id="r5C-RE-QOe"/>
143+ <outlet property="profileImageView" destination="93Q-rB-JKk" id="Q3z-aT-aGK"/>
144+ <outlet property="profileView" destination="kFZ-3c-OFY" id="aJd-83-7kt"/>
145+ <outlet property="surnameLabel" destination="vff-nz-u6X" id="je2-H8-N6i"/>
146+ <outlet property="tableView" destination="cay-ea-rTl" id="RlG-PF-8DP"/>
147+ </connections>
148+ </viewController>
149+ <placeholder placeholderIdentifier="IBFirstResponder" id="sap-zV-B7l" userLabel="First Responder" sceneMemberID="firstResponder"/>
150+ </objects>
151+ <point key="canvasLocation" x="2013.5999999999999" y="957.57121439280365"/>
43 </scene>
152 </scene>
44 <!--New Post View Controller-->
153 <!--New Post View Controller-->
45 <scene sceneID="TVK-xu-UdJ">
154 <scene sceneID="TVK-xu-UdJ">
@@ -70,7 +179,7 @@
70 </viewController>
179 </viewController>
71 <placeholder placeholderIdentifier="IBFirstResponder" id="3fd-7N-vPg" userLabel="First Responder" sceneMemberID="firstResponder"/>
180 <placeholder placeholderIdentifier="IBFirstResponder" id="3fd-7N-vPg" userLabel="First Responder" sceneMemberID="firstResponder"/>
72 </objects>
181 </objects>
73− <point key="canvasLocation" x="1773" y="132"/>
182+ <point key="canvasLocation" x="2711.1999999999998" y="131.78410794602701"/>
74 </scene>
183 </scene>
75 <!--Full Post Controller-->
184 <!--Full Post Controller-->
76 <scene sceneID="nNH-1Q-jks">
185 <scene sceneID="nNH-1Q-jks">
@@ -88,12 +197,13 @@
88 </tableViewController>
197 </tableViewController>
89 <placeholder placeholderIdentifier="IBFirstResponder" id="CP8-RO-wn0" userLabel="First Responder" sceneMemberID="firstResponder"/>
198 <placeholder placeholderIdentifier="IBFirstResponder" id="CP8-RO-wn0" userLabel="First Responder" sceneMemberID="firstResponder"/>
90 </objects>
199 </objects>
91− <point key="canvasLocation" x="2506" y="130"/>
200+ <point key="canvasLocation" x="3444" y="129.98500749625188"/>
92 </scene>
201 </scene>
93− <!--Navigation Controller-->
202+ <!--Posts-->
94 <scene sceneID="RSd-UJ-34B">
203 <scene sceneID="RSd-UJ-34B">
95 <objects>
204 <objects>
96 <navigationController automaticallyAdjustsScrollViewInsets="NO" id="NuV-ZG-ld2" sceneMemberID="viewController">
205 <navigationController automaticallyAdjustsScrollViewInsets="NO" id="NuV-ZG-ld2" sceneMemberID="viewController">
206+ <tabBarItem key="tabBarItem" title="Posts" id="dH2-sL-YsR"/>
97 <toolbarItems/>
207 <toolbarItems/>
98 <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" largeTitles="YES" id="6qB-3A-tuL">
208 <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" largeTitles="YES" id="6qB-3A-tuL">
99 <rect key="frame" x="0.0" y="20" width="375" height="96"/>
209 <rect key="frame" x="0.0" y="20" width="375" height="96"/>
@@ -106,7 +216,44 @@
106 </navigationController>
216 </navigationController>
107 <placeholder placeholderIdentifier="IBFirstResponder" id="POV-5T-jeQ" userLabel="First Responder" sceneMemberID="firstResponder"/>
217 <placeholder placeholderIdentifier="IBFirstResponder" id="POV-5T-jeQ" userLabel="First Responder" sceneMemberID="firstResponder"/>
108 </objects>
218 </objects>
109− <point key="canvasLocation" x="150" y="133"/>
219+ <point key="canvasLocation" x="1088.8" y="132.68365817091455"/>
220+ </scene>
221+ <!--Profile-->
222+ <scene sceneID="dJj-Hp-Wa9">
223+ <objects>
224+ <navigationController automaticallyAdjustsScrollViewInsets="NO" id="tae-5q-wvT" sceneMemberID="viewController">
225+ <tabBarItem key="tabBarItem" title="Profile" id="lYy-LQ-AcR"/>
226+ <toolbarItems/>
227+ <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" largeTitles="YES" id="q3a-ph-c8V">
228+ <rect key="frame" x="0.0" y="20" width="375" height="96"/>
229+ <autoresizingMask key="autoresizingMask"/>
230+ </navigationBar>
231+ <nil name="viewControllers"/>
232+ <connections>
233+ <segue destination="R4D-Ao-uvG" kind="relationship" relationship="rootViewController" id="aF6-zK-hCB"/>
234+ </connections>
235+ </navigationController>
236+ <placeholder placeholderIdentifier="IBFirstResponder" id="Fvm-qf-2Ve" userLabel="First Responder" sceneMemberID="firstResponder"/>
237+ </objects>
238+ <point key="canvasLocation" x="1089" y="958"/>
239+ </scene>
240+ <!--Tab Bar Controller-->
241+ <scene sceneID="HCR-WO-p7g">
242+ <objects>
243+ <tabBarController automaticallyAdjustsScrollViewInsets="NO" id="IeP-4W-8LT" sceneMemberID="viewController">
244+ <toolbarItems/>
245+ <tabBar key="tabBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="3pl-mU-U30">
246+ <autoresizingMask key="autoresizingMask"/>
247+ <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
248+ </tabBar>
249+ <connections>
250+ <segue destination="NuV-ZG-ld2" kind="relationship" relationship="viewControllers" id="XuX-8s-fZU"/>
251+ <segue destination="tae-5q-wvT" kind="relationship" relationship="viewControllers" id="wCJ-4N-lfC"/>
252+ </connections>
253+ </tabBarController>
254+ <placeholder placeholderIdentifier="IBFirstResponder" id="gcF-2V-bfC" userLabel="First Responder" sceneMemberID="firstResponder"/>
255+ </objects>
256+ <point key="canvasLocation" x="-466" y="641"/>
110 </scene>
257 </scene>
111 </scenes>
258 </scenes>
112</document>
259</document>
GDproject/Controller/ChannelsController.swiftdeleted−15
@@ -1,15 +0,0 @@
1−//
2−// PostTable.swift
3−// GDproject
4−//
5−// Created by cstore on 13/02/2019.
6−// Copyright © 2019 drHSE. All rights reserved.
7−//
8−
9−import UIKit
10−
11−class ChannelsController: UITableViewController {
12−
13−
14−
15−}
GDproject/Controller/News/ChannelsController.swiftnew file+35
@@ -0,0 +1,35 @@
1+//
2+// PostTable.swift
3+// GDproject
4+//
5+// Created by cstore on 13/02/2019.
6+// Copyright © 2019 drHSE. All rights reserved.
7+//
8+
9+import UIKit
10+
11+class ChannelsController: UITableViewController {
12+
13+ override func viewDidLoad() {
14+ super.viewDidLoad()
15+
16+ // Uncomment the following line to preserve selection between presentations
17+ // self.clearsSelectionOnViewWillAppear = false
18+
19+ // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
20+ // self.navigationItem.rightBarButtonItem = self.editButtonItem
21+ }
22+
23+ // MARK: - Table view data source
24+
25+ override func numberOfSections(in tableView: UITableView) -> Int {
26+ // #warning Incomplete implementation, return the number of sections
27+ return 0
28+ }
29+
30+ override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
31+ // #warning Incomplete implementation, return the number of rows
32+ return 0
33+ }
34+
35+}
GDproject/Controller/FullPostController.swift → GDproject/Controller/News/FullPostController.swiftrenamed

The content is the same.

GDproject/Controller/HeaderNewsChannels.swift → GDproject/Controller/News/HeaderNewsChannels.swiftrenamed−6
@@ -11,11 +11,8 @@ import TinyConstraints
11
11
12class HeaderNewsChannels: UITableViewCell {
12class HeaderNewsChannels: UITableViewCell {
13
13
14− weak var tableView: UITableView?
15 weak var vc: NewsController?
14 weak var vc: NewsController?
16
15
17− let basicInfo = ChannelsController()
18−
19 override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
16 override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
20 super.init(style: style, reuseIdentifier: reuseIdentifier)
17 super.init(style: style, reuseIdentifier: reuseIdentifier)
21 backgroundColor = .white
18 backgroundColor = .white
@@ -45,9 +42,6 @@ class HeaderNewsChannels: UITableViewCell {
45 case 1:
42 case 1:
46 print("channels")
43 print("channels")
47 vc?.setUpNavigationItemsForChannels()
44 vc?.setUpNavigationItemsForChannels()
48−// self.tableView?.delegate = basicInfo
49−// self.tableView?.dataSource = basicInfo
50−// tableView?.reloadData()
51 default:
45 default:
52 break
46 break
53 }
47 }
GDproject/Controller/NewPostViewController.swift → GDproject/Controller/News/NewPostViewController.swiftrenamed

The content is the same.

GDproject/Controller/NewsController.swift → GDproject/Controller/News/NewsController.swiftrenamed+16−58
@@ -20,16 +20,24 @@ class NewsController: UIViewController
20
20
21 var dataSourse: [Post] = [Post(dataArray: [.text("Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant impression. Le Lorem Ipsum est le faux texte standard de l'imprimerie depuis les années 1500, quand un imprimeur anonyme assembla ensemble des morceaux de texte pour réaliser un livre spécimen de polices de texte. Il n'a pas fait que survivre cinq siècles, mais s'est aussi adapté à la bureautique informatique, sans que son contenu n'en soit modifié. Il a été popularisé dans les années 1960 grâce à la vente de feuilles Letraset contenant des passages du Lorem Ipsum, et, plus récemment, par son inclusion dans des applications de mise en page de texte, comme Aldus PageMaker. \n On sait depuis longtemps que travailler avec du texte lisible et contenant du sens est source de distractions, et empêche de se concentrer sur la mise en page elle-même. L'avantage du Lorem Ipsum sur un texte générique comme 'Du texte. Du texte. Du texte.' est qu'il possède une distribution de lettres plus ou moins normale, et en tout cas comparable avec celle du français standard. De nombreuses suites logicielles de mise en page ou éditeurs de sites Web ont fait du Lorem Ipsum leur faux texte par défaut, et une recherche pour 'Lorem Ipsum' vous conduira vers de nombreux sites qui n'en sont encore qu'à leur phase de construction. Plusieurs versions sont apparues avec le temps, parfois par accident, souvent intentionnellement (histoire d'y rajouter de petits clins d'oeil, voire des phrases embarassantes).")], from: User(name: "vbogomazova", id: 2, fullName: "Богомазова Вероника Львовна"), date: "14.02.19 в 12:05")]
21 var dataSourse: [Post] = [Post(dataArray: [.text("Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant impression. Le Lorem Ipsum est le faux texte standard de l'imprimerie depuis les années 1500, quand un imprimeur anonyme assembla ensemble des morceaux de texte pour réaliser un livre spécimen de polices de texte. Il n'a pas fait que survivre cinq siècles, mais s'est aussi adapté à la bureautique informatique, sans que son contenu n'en soit modifié. Il a été popularisé dans les années 1960 grâce à la vente de feuilles Letraset contenant des passages du Lorem Ipsum, et, plus récemment, par son inclusion dans des applications de mise en page de texte, comme Aldus PageMaker. \n On sait depuis longtemps que travailler avec du texte lisible et contenant du sens est source de distractions, et empêche de se concentrer sur la mise en page elle-même. L'avantage du Lorem Ipsum sur un texte générique comme 'Du texte. Du texte. Du texte.' est qu'il possède une distribution de lettres plus ou moins normale, et en tout cas comparable avec celle du français standard. De nombreuses suites logicielles de mise en page ou éditeurs de sites Web ont fait du Lorem Ipsum leur faux texte par défaut, et une recherche pour 'Lorem Ipsum' vous conduira vers de nombreux sites qui n'en sont encore qu'à leur phase de construction. Plusieurs versions sont apparues avec le temps, parfois par accident, souvent intentionnellement (histoire d'y rajouter de petits clins d'oeil, voire des phrases embarassantes).")], from: User(name: "vbogomazova", id: 2, fullName: "Богомазова Вероника Львовна"), date: "14.02.19 в 12:05")]
22
22
23+ var news = NewsVC()
24+ var channels = ChannelsController()
25+
23 override func viewDidLoad()
26 override func viewDidLoad()
24 {
27 {
25 super.viewDidLoad()
28 super.viewDidLoad()
26 tableView.register(HeaderNewsChannels.self, forCellReuseIdentifier: headerNewsChannelsVC)
29 tableView.register(HeaderNewsChannels.self, forCellReuseIdentifier: headerNewsChannelsVC)
27 tableView.register(PostViewCell.self, forCellReuseIdentifier: postCellId)
30 tableView.register(PostViewCell.self, forCellReuseIdentifier: postCellId)
28
31
32+ news.dataSourse = dataSourse
33+ news.viewController = self
34+
29− tableView.delegate = self
35+ tableView.delegate = news
30− tableView.dataSource = self
36+ tableView.dataSource = news
31 tableView.reloadData()
37 tableView.reloadData()
32
38
39+
40+
33 setUpNavigationItemsforPosts()
41 setUpNavigationItemsforPosts()
34 searchController.searchBar.placeholder = "Search anything"
42 searchController.searchBar.placeholder = "Search anything"
35
43
@@ -47,11 +55,17 @@ class NewsController: UIViewController
47 func setUpNavigationItemsforPosts(){
55 func setUpNavigationItemsforPosts(){
48 navigationItem.title = "Posts"
56 navigationItem.title = "Posts"
49 navigationItem.rightBarButtonItems = [UIBarButtonItem(barButtonSystemItem: .compose, target: self, action: #selector(self.writePost(_:)))]
57 navigationItem.rightBarButtonItems = [UIBarButtonItem(barButtonSystemItem: .compose, target: self, action: #selector(self.writePost(_:)))]
58+ tableView.delegate = news
59+ tableView.dataSource = news
60+ tableView.reloadData()
50 }
61 }
51
62
52 func setUpNavigationItemsForChannels(){
63 func setUpNavigationItemsForChannels(){
53 navigationItem.title = "Channels"
64 navigationItem.title = "Channels"
54 navigationItem.rightBarButtonItems = [UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(addChannel))]
65 navigationItem.rightBarButtonItems = [UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(addChannel))]
66+ tableView.delegate = channels
67+ tableView.dataSource = channels
68+ tableView.reloadData()
55 }
69 }
56
70
57 @objc func writePost(_ barItem: UIBarButtonItem)
71 @objc func writePost(_ barItem: UIBarButtonItem)
@@ -146,59 +160,3 @@ class NewsController: UIViewController
146 }
160 }
147 }
161 }
148}
162}
149−
150−// MARK:- tableView delegate
151−extension NewsController: UITableViewDelegate{
152− func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)
153− {
154− tableView.deselectRow(at: indexPath, animated: true)
155−
156− let vc = storyboard!.instantiateViewController(withIdentifier: fullPostControllerId) as! FullPostController
157−
158− vc.post = dataSourse[indexPath.row]
159− navigationController!.pushViewController(vc, animated: true)
160− }
161−}
162−
163−// MARK:- tableView dataSourse
164−extension NewsController: UITableViewDataSource
165−{
166− func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
167− return dataSourse.count
168− }
169−
170− func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
171− {
172− let cell = tableView.dequeueReusableCell(withIdentifier: postCellId, for: indexPath) as! PostViewCell
173−
174− cell.fill(with: dataSourse[indexPath.row].dataArray, false)
175− cell.selectionStyle = .none
176− return cell
177− }
178−
179− func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
180− return UITableView.automaticDimension
181− }
182−
183− func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat {
184− return 100.0
185− }
186−
187− func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
188− return 46.0
189− }
190−
191− func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView?
192− {
193− let cell = tableView.dequeueReusableCell(withIdentifier: headerNewsChannelsVC) as! HeaderNewsChannels
194− cell.vc = self
195−
196− let view = UIView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: 46.0))
197− view.addSubview(cell)
198− cell.edgesToSuperview()
199−
200− return view
201− }
202−
203−
204−}
GDproject/Controller/News/NewsVC.swiftnew file+64
@@ -0,0 +1,64 @@
1+//
2+// NewsVC.swift
3+// GDproject
4+//
5+// Created by cstore on 15/02/2019.
6+// Copyright © 2019 drHSE. All rights reserved.
7+//
8+
9+import UIKit
10+
11+class NewsVC: UIViewController, UITableViewDelegate, UITableViewDataSource{
12+
13+ var dataSourse: [Post] = []
14+
15+ var viewController: UIViewController?
16+
17+ func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)
18+ {
19+ tableView.deselectRow(at: indexPath, animated: true)
20+
21+ let vc = viewController!.storyboard!.instantiateViewController(withIdentifier: fullPostControllerId) as! FullPostController
22+
23+ vc.post = dataSourse[indexPath.row]
24+ viewController!.navigationController!.pushViewController(vc, animated: true)
25+ }
26+
27+ func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
28+ return dataSourse.count
29+ }
30+
31+ func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
32+ {
33+ let cell = tableView.dequeueReusableCell(withIdentifier: postCellId, for: indexPath) as! PostViewCell
34+
35+ cell.fill(with: dataSourse[indexPath.row].dataArray, false)
36+ cell.selectionStyle = .none
37+ return cell
38+ }
39+
40+ func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
41+ return UITableView.automaticDimension
42+ }
43+
44+ func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat {
45+ return 100.0
46+ }
47+
48+ func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
49+ return 46.0
50+ }
51+
52+ func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView?
53+ {
54+ let cell = tableView.dequeueReusableCell(withIdentifier: headerNewsChannelsVC) as! HeaderNewsChannels
55+ //cell.vc = viewController as? NewsController
56+
57+ let view = UIView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: 46.0))
58+ view.addSubview(cell)
59+ cell.edgesToSuperview()
60+
61+ return view
62+ }
63+
64+}
GDproject/Controller/ProfileViewController.swiftnew file+96
@@ -0,0 +1,96 @@
1+//
2+// ProfileViewController.swift
3+// GDproject
4+//
5+// Created by cstore on 15/02/2019.
6+// Copyright © 2019 drHSE. All rights reserved.
7+//
8+
9+import UIKit
10+
11+class ProfileViewController: UIViewController {
12+
13+ @IBOutlet weak var profileView: UIView!
14+
15+ @IBOutlet weak var tableView: UITableView!
16+
17+ @IBOutlet weak var profileImageView: UIImageView!
18+
19+ @IBOutlet weak var surnameLabel: UILabel!
20+
21+ @IBOutlet weak var nameLabel: UILabel!
22+
23+ @IBOutlet weak var facultyLabel: UILabel!
24+
25+ @IBOutlet weak var placeLabel: UILabel!
26+
27+ @IBOutlet weak var newMessageButton: UIButton!
28+
29+
30+ func fill(with user: User){
31+ self.facultyLabel.text = user.faculty ?? ""
32+ self.nameLabel.text = "\(user.initials.name) \(user.initials.optional ?? "")"
33+ self.surnameLabel.text = user.initials.surname
34+ self.profileImageView.image = #imageLiteral(resourceName: "kitten").roundedImage
35+ self.placeLabel.text = user.placeOfWork
36+ }
37+
38+ var user: User = User(surname: "Богомазова", name: "Вероника", optional: "Львовна", emailName: "vbogomazova", id: 2, place: "📍Москва, Кочновский пр. 3", faculty: "Методист: Факультет Компьютерных наук")
39+
40+ //let basicInfo = BasicInfoTableViewController()
41+ let posts = NewsVC()
42+
43+ override func viewDidLoad() {
44+ super.viewDidLoad()
45+ posts.dataSourse = [Post(dataArray: [.text("Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant impression. Le Lorem Ipsum est le faux texte standard de l'imprimerie depuis les années 1500, quand un imprimeur anonyme assembla ensemble des morceaux de texte pour réaliser un livre spécimen de polices de texte. Il n'a pas fait que survivre cinq siècles, mais s'est aussi adapté à la bureautique informatique, sans que son contenu n'en soit modifié. Il a été popularisé dans les années 1960 grâce à la vente de feuilles Letraset contenant des passages du Lorem Ipsum, et, plus récemment, par son inclusion dans des applications de mise en page de texte, comme Aldus PageMaker. est qu'il possède une distribution de lettres plus ou moins normale, et en tout cas comparable avec celle du français standard. De nombreuses suites logicielles de mise en page ou éditeurs de sites Web ont fait du Lorem Ipsum leur faux texte par défaut, et une recherche pour 'Lorem Ipsum' vous conduira vers de nombreux sites qui n'en sont encore qu'à leur phase de construction. Plusieurs versions sont apparues avec le temps, parfois par accident, souvent intentionnellement (histoire d'y rajouter de petits clins d'oeil, voire des phrases embarassantes).")]), Post(dataArray: [.text("Il n'a pas fait que survivre cinq siècles, mais s'est aussi adapté à la bureautique informatique, sans que son contenu n'en soit modifié. Il a été popularisé dans les années 1960 grâce à la vente de feuilles Letraset contenant des passages du Lorem Ipsum, et, plus récemment, par son inclusion dans des applications de mise en page de texte, comme Aldus PageMaker. .")])]
46+
47+ tableView.register(HeaderNewsChannels.self, forCellReuseIdentifier: headerNewsChannelsVC)
48+
49+ tableView.register(PostViewCell.self, forCellReuseIdentifier: postCellId)
50+
51+ posts.viewController = self
52+
53+ fill(with: user)
54+ tableView.delegate = posts
55+ tableView.dataSource = posts
56+ tableView.reloadData()
57+ }
58+
59+ override func viewWillAppear(_ animated: Bool) {
60+ setUpNavigarionBar()
61+ }
62+
63+ func setUpNavigarionBar(){
64+ navigationController?.navigationBar.prefersLargeTitles = true
65+ navigationItem.title = user.login
66+ let uibarbutton = UIBarButtonItem(title: "More", style: .plain, target: self, action: #selector(showInformation))
67+ navigationItem.rightBarButtonItems = [uibarbutton]
68+ navigationItem.largeTitleDisplayMode = .always
69+ }
70+
71+
72+ let copyLink: UIAlertAction = {
73+ let b = UIAlertAction(title: "Copy link", style: .default)
74+ return b
75+ }()
76+
77+ @objc func showInformation(){
78+
79+ // drafts
80+ // saved
81+
82+ let optionMenu = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
83+ let editAction = UIAlertAction(title: "Edit profile", style: .default)
84+ let settingsAction = UIAlertAction(title: "Settings", style: .default)
85+ let cancelAction = UIAlertAction(title: "Cancel", style: .cancel)
86+ let shareAction = UIAlertAction(title: "Share", style: .default)
87+
88+ optionMenu.addAction(editAction)
89+ optionMenu.addAction(settingsAction)
90+ optionMenu.addAction(copyLink)
91+ optionMenu.addAction(shareAction)
92+ optionMenu.addAction(cancelAction)
93+
94+ self.present(optionMenu, animated: true, completion: nil)
95+ }
96+}
GDproject/Extentions.swiftnew file+22
@@ -0,0 +1,22 @@
1+//
2+// Extentions.swift
3+// GDproject
4+//
5+// Created by cstore on 15/02/2019.
6+// Copyright © 2019 drHSE. All rights reserved.
7+//
8+
9+import UIKit
10+
11+extension UIImage{
12+ var roundedImage: UIImage {
13+ let rect = CGRect(origin:CGPoint(x: 0, y: 0), size: self.size)
14+ UIGraphicsBeginImageContextWithOptions(self.size, false, 1)
15+ UIBezierPath(
16+ roundedRect: rect,
17+ cornerRadius: self.size.height
18+ ).addClip()
19+ self.draw(in: rect)
20+ return UIGraphicsGetImageFromCurrentImageContext()!
21+ }
22+}
GDproject/Controller/MyStackView.swift → GDproject/MyStackView.swiftrenamed

The content is the same.

GDproject/Simple model/Post.swift+7−1
@@ -13,7 +13,7 @@ struct Post {
13 var dataArray: [Media]
13 var dataArray: [Media]
14 var fromUser: User
14 var fromUser: User
15 var atDate: String
15 var atDate: String
16− var comments: [Comment]
16+ var comments: [Comment] = []
17 var hashtags: [String] = ["ФКН", "Подбельский", "НИУВШЭ", "Шершаков", "ПАД", "Интересное","Мемы","Забавное","Учеба","Наука"]
17 var hashtags: [String] = ["ФКН", "Подбельский", "НИУВШЭ", "Шершаков", "ПАД", "Интересное","Мемы","Забавное","Учеба","Наука"]
18
18
19 init(dataArray: [Media], from: User, date: String, comments: [Comment] = [])
19 init(dataArray: [Media], from: User, date: String, comments: [Comment] = [])
@@ -23,6 +23,12 @@ struct Post {
23 atDate = date
23 atDate = date
24 self.comments = comments
24 self.comments = comments
25 }
25 }
26+
27+ init(dataArray: [Media]) {
28+ self.dataArray = dataArray
29+ fromUser = User(name: "vbogomazova", id: 2, fullName: "Богомазова Вероника Львовна")
30+ atDate = "23.03.19 в 23:33"
31+ }
26}
32}
27
33
28
34
GDproject/Simple model/User.swift+2−2
@@ -13,11 +13,11 @@ struct User {
13 //var photo: UIImage? = #imageLiteral(resourceName: "image")
13 //var photo: UIImage? = #imageLiteral(resourceName: "image")
14 var login: String
14 var login: String
15 var id: Int
15 var id: Int
16− var surname: String?
17 var fullName: String
16 var fullName: String
18− var initials: (surname: String, name: String, optional: String?)?
17+ var initials: (surname: String, name: String, optional: String?) = ("Богомазова","Вероника","Львовна")
19 var placeOfWork: String?
18 var placeOfWork: String?
20 var faculty: String?
19 var faculty: String?
20+ let posts: [Post] = []
21
21
22 init(name: String, id: Int, fullName: String) {
22 init(name: String, id: Int, fullName: String) {
23 self.login = name
23 self.login = name
GDproject/Supporting files/Assets.xcassets/kitten.imageset/Contents.jsonnew file+21
@@ -0,0 +1,21 @@
1+{
2+ "images" : [
3+ {
4+ "idiom" : "universal",
5+ "filename" : "s1200-2.jpeg",
6+ "scale" : "1x"
7+ },
8+ {
9+ "idiom" : "universal",
10+ "scale" : "2x"
11+ },
12+ {
13+ "idiom" : "universal",
14+ "scale" : "3x"
15+ }
16+ ],
17+ "info" : {
18+ "version" : 1,
19+ "author" : "xcode"
20+ }
21+}
GDproject/Supporting files/Assets.xcassets/kitten.imageset/s1200-2.jpegnew file

Binary file not shown.