[+] Display family name in account vc
This commit is contained in:
@@ -167,8 +167,14 @@ class ManageVC: UIViewController
|
||||
func display()
|
||||
{
|
||||
lUsername.text = localStorage.string(forKey: "name")
|
||||
// TODO: Correct join date
|
||||
// TODO: Implement join date (not important)
|
||||
lJoinDate.text = localStorage.string(forKey: "id")
|
||||
|
||||
// Display family name
|
||||
if let family = localStorage.object(forKey: "family") as? Family
|
||||
{
|
||||
lCurrentFamily.text = family.name
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -198,6 +204,8 @@ class ManageVC: UIViewController
|
||||
*/
|
||||
class FamilyVC: UIViewController
|
||||
{
|
||||
// No family view - prompt to create/join a family
|
||||
@IBOutlet weak var noFamilyView: UIView!
|
||||
var createMode: Bool!
|
||||
|
||||
@IBAction func btnCreate(_ sender: Any)
|
||||
|
||||
@@ -1059,72 +1059,85 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="650"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="justified" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Dki-8q-7sB">
|
||||
<rect key="frame" x="20" y="65" width="374" height="57.5"/>
|
||||
<string key="text">You're not in a family yet. Do you want to create or join one? If you are a parent, family features allow you to add alarms to your children's list.</string>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<color key="textColor" systemColor="secondaryLabelColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="Afe-5l-IkF">
|
||||
<rect key="frame" x="20" y="142.5" width="374" height="30"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Dd1-LB-2Mm">
|
||||
<rect key="frame" x="0.0" y="0.0" width="177" height="30"/>
|
||||
<state key="normal" title="Create"/>
|
||||
<connections>
|
||||
<action selector="btnCreate:" destination="4ss-Ye-Da4" eventType="touchUpInside" id="hQN-oC-Qzf"/>
|
||||
<action selector="register:" destination="ZAC-hn-zGl" eventType="touchUpInside" id="4uN-vJ-WXg"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tz1-gQ-74Y">
|
||||
<rect key="frame" x="197" y="0.0" width="177" height="30"/>
|
||||
<state key="normal" title="Join"/>
|
||||
<connections>
|
||||
<action selector="btnJoin:" destination="4ss-Ye-Da4" eventType="touchUpInside" id="oVw-q9-eDv"/>
|
||||
<action selector="login:" destination="ZAC-hn-zGl" eventType="touchUpInside" id="4rF-hE-JDe"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Family" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4kN-8K-gM9">
|
||||
<rect key="frame" x="20" y="10" width="374" height="20.5"/>
|
||||
<rect key="frame" x="20" y="20" width="374" height="20.5"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Manage Family Members" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4JV-r6-luC">
|
||||
<rect key="frame" x="20" y="30.5" width="374" height="14.5"/>
|
||||
<rect key="frame" x="20" y="40.5" width="374" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yB2-sF-tqs">
|
||||
<rect key="frame" x="20" y="75" width="374" height="107.5"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="Afe-5l-IkF">
|
||||
<rect key="frame" x="0.0" y="77.5" width="374" height="30"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Dd1-LB-2Mm">
|
||||
<rect key="frame" x="0.0" y="0.0" width="177" height="30"/>
|
||||
<state key="normal" title="Create"/>
|
||||
<connections>
|
||||
<action selector="btnCreate:" destination="4ss-Ye-Da4" eventType="touchUpInside" id="hQN-oC-Qzf"/>
|
||||
<action selector="register:" destination="ZAC-hn-zGl" eventType="touchUpInside" id="4uN-vJ-WXg"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tz1-gQ-74Y">
|
||||
<rect key="frame" x="197" y="0.0" width="177" height="30"/>
|
||||
<state key="normal" title="Join"/>
|
||||
<connections>
|
||||
<action selector="btnJoin:" destination="4ss-Ye-Da4" eventType="touchUpInside" id="oVw-q9-eDv"/>
|
||||
<action selector="login:" destination="ZAC-hn-zGl" eventType="touchUpInside" id="4rF-hE-JDe"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="justified" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Dki-8q-7sB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="374" height="57.5"/>
|
||||
<string key="text">You're not in a family yet. Do you want to create or join one? If you are a parent, family features allow you to add alarms to your children's list.</string>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<color key="textColor" systemColor="secondaryLabelColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Dki-8q-7sB" firstAttribute="top" secondItem="yB2-sF-tqs" secondAttribute="top" id="6Wb-fC-MCf"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Dki-8q-7sB" secondAttribute="trailing" id="FlT-Vd-Cmq"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Afe-5l-IkF" secondAttribute="bottom" id="Sss-B4-a65"/>
|
||||
<constraint firstItem="Dki-8q-7sB" firstAttribute="leading" secondItem="yB2-sF-tqs" secondAttribute="leading" id="Y5l-wW-nua"/>
|
||||
<constraint firstItem="Afe-5l-IkF" firstAttribute="leading" secondItem="yB2-sF-tqs" secondAttribute="leading" id="ZLK-CO-w9x"/>
|
||||
<constraint firstItem="Afe-5l-IkF" firstAttribute="top" secondItem="Dki-8q-7sB" secondAttribute="bottom" constant="20" id="hT6-ZL-eqA"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Afe-5l-IkF" secondAttribute="trailing" id="uoC-iy-Uvw"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="ZHP-aO-cBk"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Afe-5l-IkF" firstAttribute="leading" secondItem="ZHP-aO-cBk" secondAttribute="leading" constant="20" id="7Wq-4d-rTw"/>
|
||||
<constraint firstItem="4kN-8K-gM9" firstAttribute="top" secondItem="ZHP-aO-cBk" secondAttribute="top" constant="10" id="99M-Lo-GoC"/>
|
||||
<constraint firstItem="4kN-8K-gM9" firstAttribute="top" secondItem="ZHP-aO-cBk" secondAttribute="top" constant="20" id="99M-Lo-GoC"/>
|
||||
<constraint firstItem="ZHP-aO-cBk" firstAttribute="trailing" secondItem="yB2-sF-tqs" secondAttribute="trailing" constant="20" id="EoR-1a-gX9"/>
|
||||
<constraint firstItem="4kN-8K-gM9" firstAttribute="trailing" secondItem="4JV-r6-luC" secondAttribute="trailing" id="Idr-0Z-Irc"/>
|
||||
<constraint firstItem="Dki-8q-7sB" firstAttribute="leading" secondItem="ZHP-aO-cBk" secondAttribute="leading" constant="20" id="XkE-W5-sWz"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Dki-8q-7sB" secondAttribute="trailing" constant="20" id="Zvs-aO-MjT"/>
|
||||
<constraint firstItem="Dki-8q-7sB" firstAttribute="top" secondItem="4JV-r6-luC" secondAttribute="bottom" constant="20" id="eMB-cQ-PAa"/>
|
||||
<constraint firstItem="4JV-r6-luC" firstAttribute="leading" secondItem="Dki-8q-7sB" secondAttribute="leading" id="fKc-7I-xvr"/>
|
||||
<constraint firstItem="ZHP-aO-cBk" firstAttribute="trailing" secondItem="Afe-5l-IkF" secondAttribute="trailing" constant="20" id="hgw-f3-cc9"/>
|
||||
<constraint firstItem="4kN-8K-gM9" firstAttribute="leading" secondItem="ZHP-aO-cBk" secondAttribute="leading" constant="20" id="QHJ-i3-Z9o"/>
|
||||
<constraint firstItem="ZHP-aO-cBk" firstAttribute="trailing" secondItem="4kN-8K-gM9" secondAttribute="trailing" constant="20" id="egO-zB-efN"/>
|
||||
<constraint firstItem="yB2-sF-tqs" firstAttribute="top" secondItem="4JV-r6-luC" secondAttribute="bottom" constant="20" id="hAD-jQ-eLo"/>
|
||||
<constraint firstItem="4kN-8K-gM9" firstAttribute="leading" secondItem="4JV-r6-luC" secondAttribute="leading" id="hyU-dP-Zcc"/>
|
||||
<constraint firstItem="4JV-r6-luC" firstAttribute="trailing" secondItem="Dki-8q-7sB" secondAttribute="trailing" id="oH4-ST-DRW"/>
|
||||
<constraint firstItem="Afe-5l-IkF" firstAttribute="top" secondItem="Dki-8q-7sB" secondAttribute="bottom" constant="20" id="pI4-jL-6vb"/>
|
||||
<constraint firstItem="yB2-sF-tqs" firstAttribute="leading" secondItem="ZHP-aO-cBk" secondAttribute="leading" constant="20" id="rMF-jX-a4l"/>
|
||||
<constraint firstItem="4JV-r6-luC" firstAttribute="top" secondItem="4kN-8K-gM9" secondAttribute="bottom" id="xRb-1q-Gad"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" id="6by-4V-XuW"/>
|
||||
<connections>
|
||||
<outlet property="noFamilyView" destination="yB2-sF-tqs" id="dp1-fy-2tU"/>
|
||||
<segue destination="MJK-PM-TUJ" kind="show" identifier="family-create-join" destinationCreationSelector="segueCreateJoin:" id="Abf-zv-CJ0"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="eGH-yq-k1z" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="897" y="2271"/>
|
||||
<point key="canvasLocation" x="895.6521739130435" y="2270.7589285714284"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
|
||||
Reference in New Issue
Block a user