Merge branch 'charlesmchen/appSettingsSegue'

pull/1/head
Matthew Chen 7 years ago
commit 1f68f3af71

@ -23,6 +23,7 @@
#import "PrivacySettingsTableViewController.h"
#import "PropertyListPreferences.h"
#import "PushManager.h"
#import "SettingsTableViewController.h"
#import "TSSocketManager.h"
#import "TSStorageManager+Calling.h"
#import "UIColor+OWS.h"

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12118" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="tuk-0x-yCb">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12118" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="tuk-0x-yCb">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
@ -85,9 +86,6 @@
<barButtonItem key="leftBarButtonItem" image="settings" width="100" id="PYj-7F-J24">
<inset key="imageInsets" minX="-10" minY="0.0" maxX="0.0" maxY="0.0"/>
<color key="tintColor" red="0.99987119436264038" green="0.99998223781585693" blue="0.99984109401702881" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<segue destination="u7y-N1-6Ba" kind="modal" identifier="ShowAppSettingsSegue" id="0Mt-zV-9BX"/>
</connections>
</barButtonItem>
<barButtonItem key="rightBarButtonItem" systemItem="compose" id="Oft-fU-tf5">
<inset key="imageInsets" minX="-10" minY="0.0" maxX="10" maxY="0.0"/>
@ -377,22 +375,6 @@
</objects>
<point key="canvasLocation" x="-860" y="-1285"/>
</scene>
<!--Conversation Settings-->
<scene sceneID="Flt-X5-Amc">
<objects>
<tableViewController storyboardIdentifier="OWSConversationSettingsTableViewController" title="Contact Information" id="4oU-Rv-yJi" userLabel="Conversation Settings" customClass="OWSConversationSettingsTableViewController" sceneMemberID="viewController"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="Ftx-dN-loa" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-1448" y="-1570"/>
</scene>
<!--Show Group Members View Controller-->
<scene sceneID="VBt-Ax-0G9">
<objects>
<tableViewController storyboardIdentifier="ShowGroupMembersViewController" id="JeZ-9g-U61" customClass="ShowGroupMembersViewController" sceneMemberID="viewController"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="3R8-C6-Zq8" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-1032" y="-1540"/>
</scene>
<!--Signals Navigation Controller-->
<scene sceneID="miN-Ma-3eR">
<objects>
@ -504,34 +486,6 @@
</objects>
<point key="canvasLocation" x="-2404" y="-3229"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="nF7-wR-ITu">
<objects>
<navigationController storyboardIdentifier="SettingsNavigationController" id="u7y-N1-6Ba" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" misplaced="YES" id="OEe-gh-9Ii">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="n1f-7Y-906" kind="relationship" relationship="rootViewController" id="uJP-O4-8ru"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="fcH-eb-GHP" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-3305" y="-3228"/>
</scene>
<!--Settings-->
<scene sceneID="BD7-1h-slc">
<objects>
<tableViewController storyboardIdentifier="SettingsTableViewController" id="n1f-7Y-906" userLabel="Settings" customClass="SettingsTableViewController" sceneMemberID="viewController">
<toolbarItems/>
<navigationItem key="navigationItem" title="Settings" id="Yrv-vP-ZVP" userLabel="_7.0a - Navigation Bar"/>
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="b8Q-ui-1Tb" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-2867" y="-3230"/>
</scene>
<!--Link Device-->
<scene sceneID="all-Be-y2s">
<objects>
@ -622,99 +576,6 @@
</objects>
<point key="canvasLocation" x="-2023" y="-3228"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="aWR-d3-s5V">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="cZ7-de-SUi" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" misplaced="YES" translucent="NO" id="gzw-fh-en2">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<color key="barTintColor" red="0.082137122750282288" green="0.46843802928924561" blue="0.91112053394317627" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="Qga-41-bw2" kind="relationship" relationship="rootViewController" id="gt8-cl-Yhf"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="b1E-7L-eKw" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-2836" y="-234"/>
</scene>
<!--New Message-->
<scene sceneID="qez-9r-EDt">
<objects>
<tableViewController storyboardIdentifier="MessageComposeTableViewController" modalTransitionStyle="crossDissolve" id="Qga-41-bw2" customClass="MessageComposeTableViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="X9S-Pa-EbX">
<rect key="frame" x="0.0" y="64" width="375" height="603"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="ContactTableViewCell" rowHeight="59" id="Ld5-sX-pB8" customClass="ContactTableViewCell">
<rect key="frame" x="0.0" y="22" width="375" height="59"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Ld5-sX-pB8" id="EqP-87-4hZ">
<rect key="frame" x="0.0" y="0.0" width="375" height="58.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4zF-SU-q4z">
<rect key="frame" x="68" y="8" width="299" height="42"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="empty-group-avatar" translatesAutoresizingMaskIntoConstraints="NO" id="11n-jp-FCg">
<rect key="frame" x="16" y="9" width="40" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="QYQ-Ma-4Vc"/>
<constraint firstAttribute="width" constant="40" id="jlW-F8-wog"/>
</constraints>
</imageView>
</subviews>
<constraints>
<constraint firstAttribute="trailingMargin" secondItem="4zF-SU-q4z" secondAttribute="trailing" id="0Af-5G-21G"/>
<constraint firstItem="11n-jp-FCg" firstAttribute="leading" secondItem="EqP-87-4hZ" secondAttribute="leadingMargin" constant="8" id="GYw-2Z-sxC"/>
<constraint firstItem="4zF-SU-q4z" firstAttribute="leading" secondItem="11n-jp-FCg" secondAttribute="trailing" constant="12" id="ZiW-nb-biK"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="11n-jp-FCg" secondAttribute="bottom" constant="6" id="d2J-3C-boc"/>
<constraint firstItem="11n-jp-FCg" firstAttribute="top" relation="greaterThanOrEqual" secondItem="EqP-87-4hZ" secondAttribute="top" constant="6" id="f2o-9N-mNq"/>
<constraint firstItem="11n-jp-FCg" firstAttribute="centerY" secondItem="EqP-87-4hZ" secondAttribute="centerY" id="kje-lH-syk"/>
<constraint firstAttribute="bottomMargin" secondItem="4zF-SU-q4z" secondAttribute="bottom" id="qZb-xR-JoS"/>
<constraint firstItem="4zF-SU-q4z" firstAttribute="top" secondItem="EqP-87-4hZ" secondAttribute="topMargin" id="ruR-db-L1p"/>
</constraints>
</tableViewCellContentView>
<inset key="separatorInset" minX="15" minY="0.0" maxX="0.0" maxY="0.0"/>
<connections>
<outlet property="avatarView" destination="11n-jp-FCg" id="OBx-gj-ljU"/>
<outlet property="nameLabel" destination="4zF-SU-q4z" id="ita-p1-Vod"/>
</connections>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="Qga-41-bw2" id="dUq-5d-dub"/>
<outlet property="delegate" destination="Qga-41-bw2" id="vfF-Gh-noL"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="New Message" id="D6A-aV-gEq">
<barButtonItem key="backBarButtonItem" title=" " id="rvF-0w-DNd"/>
<barButtonItem key="leftBarButtonItem" systemItem="stop" id="bP2-Tc-byJ">
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<action selector="closeAction:" destination="Qga-41-bw2" id="i8h-aS-Y3o"/>
</connections>
</barButtonItem>
<barButtonItem key="rightBarButtonItem" image="btnGroup--white" id="Xmt-s8-mRN">
<inset key="imageInsets" minX="-10" minY="0.0" maxX="10" maxY="0.0"/>
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<action selector="showNewGroupView:" destination="Qga-41-bw2" id="tIm-Ok-rht"/>
</connections>
</barButtonItem>
</navigationItem>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="fUD-iU-Cax" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-2357" y="-235"/>
</scene>
<!--Device QR Scanner-->
<scene sceneID="f3S-St-vF2">
<objects>
@ -754,11 +615,9 @@
</scenes>
<resources>
<image name="btnCamera--white" width="52" height="40"/>
<image name="btnGroup--white" width="44" height="44"/>
<image name="btnQRShow--white" width="66" height="66"/>
<image name="btnQRShow--white-1" width="66" height="66"/>
<image name="contact-options-action" width="44" height="44"/>
<image name="empty-group-avatar" width="53" height="53"/>
<image name="ic_devices_ios" width="180" height="119"/>
<image name="settings" width="44" height="44"/>
</resources>

@ -6,15 +6,10 @@ import Foundation
extension UIStoryboard {
private enum StoryboardName: String {
case main = "Main",
registration = "Registration"
case main = "Main"
}
class var main: UIStoryboard {
return UIStoryboard(name: StoryboardName.main.rawValue, bundle: Bundle.main)
}
class var registration: UIStoryboard {
return UIStoryboard(name: StoryboardName.registration.rawValue, bundle: Bundle.main)
}
}

@ -803,10 +803,8 @@ class CallViewController: UIViewController, CallObserver, CallServiceObserver, R
assert(fromViewController != nil)
// Construct the "settings" view & push the "privacy settings" view.
let navigationController = UIStoryboard.main.instantiateViewController(withIdentifier: "SettingsNavigationController") as! UINavigationController
assert(navigationController.viewControllers.count == 1)
let privacySettingsViewController = PrivacySettingsTableViewController()
navigationController.pushViewController(privacySettingsViewController, animated:false)
let navigationController = UINavigationController(rootViewController:SettingsTableViewController())
navigationController.pushViewController(PrivacySettingsTableViewController(), animated:false)
fromViewController?.present(navigationController, animated: true, completion: nil)
})

@ -113,7 +113,6 @@
[self dismissViewControllerAnimated:YES completion:nil];
}
#pragma mark - UISearchBarDelegate
- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText

@ -38,12 +38,9 @@ private class CallKitExperienceUpgradeViewController: ExperienceUpgradeViewContr
assert(fromViewController != nil)
// Construct the "settings" view & push the "privacy settings" view.
let navigationController = UIStoryboard.main.instantiateViewController(withIdentifier:"SettingsNavigationController") as! UINavigationController
assert(navigationController.viewControllers.count == 1)
let navigationController = UINavigationController(rootViewController:SettingsTableViewController())
navigationController.pushViewController(PrivacySettingsTableViewController(), animated:false)
let privacySettingsViewController = PrivacySettingsTableViewController()
navigationController.pushViewController(privacySettingsViewController, animated:false)
fromViewController?.present(navigationController, animated: true, completion: nil)
}
}
@ -85,7 +82,7 @@ private class ExperienceUpgradeViewController: UIViewController {
titleLabel.font = UIFont.ows_regularFont(withSize: ScaleFromIPhone5To7Plus(26, 32))
titleLabel.textColor = UIColor.white
titleLabel.minimumScaleFactor = 0.5
titleLabel.adjustsFontSizeToFitWidth = true;
titleLabel.adjustsFontSizeToFitWidth = true
// Body label
let bodyLabel = UILabel()

@ -2133,8 +2133,7 @@ typedef enum : NSUInteger {
return;
}
OWSConversationSettingsTableViewController *settingsVC =
[[UIStoryboard main] instantiateViewControllerWithIdentifier:@"OWSConversationSettingsTableViewController"];
OWSConversationSettingsTableViewController *settingsVC = [OWSConversationSettingsTableViewController new];
settingsVC.conversationSettingsViewDelegate = self;
[settingsVC configureWithThread:self.thread];
[self.navigationController pushViewController:settingsVC animated:YES];

@ -405,7 +405,7 @@ NS_ASSUME_NONNULL_BEGIN
return;
}
ShowGroupMembersViewController *showGroupMembersViewController =
[[UIStoryboard main] instantiateViewControllerWithIdentifier:@"ShowGroupMembersViewController"];
[ShowGroupMembersViewController new];
[showGroupMembersViewController configWithThread:(TSGroupThread *)strongSelf.thread];
[strongSelf.navigationController pushViewController:showGroupMembersViewController animated:YES];
}],

@ -6,18 +6,4 @@
@interface SettingsTableViewController : OWSTableViewController
//@property (strong, nonatomic) IBOutlet UILabel *registeredName;
//@property (strong, nonatomic) IBOutlet UILabel *registeredNumber;
//@property (strong, nonatomic) IBOutlet UILabel *networkStatusLabel;
//@property (strong, nonatomic) IBOutlet UILabel *networkStatusHeader;
//@property (strong, nonatomic) IBOutlet UILabel *privacyLabel;
//@property (strong, nonatomic) IBOutlet UILabel *notificationsLabel;
//@property (strong, nonatomic) IBOutlet UILabel *linkedDevicesLabel;
//@property (strong, nonatomic) IBOutlet UILabel *advancedLabel;
//@property (strong, nonatomic) IBOutlet UILabel *aboutLabel;
//@property (strong, nonatomic) IBOutlet UILabel *inviteLabel;
//@property (strong, nonatomic) IBOutlet UIButton *destroyAccountButton;
//
//- (IBAction)unregisterUser:(id)sender;
@end

@ -63,6 +63,10 @@
[self.navigationItem setHidesBackButton:YES];
[self.navigationController.navigationBar setTranslucent:NO];
self.navigationItem.leftBarButtonItem =
[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemStop
target:self
action:@selector(dismissWasPressed:)];
[self observeNotifications];
@ -246,6 +250,11 @@
[self.navigationController pushViewController:vc animated:YES];
}
- (void)dismissWasPressed:(id)sender
{
[self dismissViewControllerAnimated:YES completion:nil];
}
#pragma mark - Table view data source
- (void)unregisterUser

@ -11,6 +11,7 @@
#import "OWSContactsManager.h"
#import "PropertyListPreferences.h"
#import "PushManager.h"
#import "SettingsTableViewController.h"
#import "Signal-Swift.h"
#import "TSAccountManager.h"
#import "TSDatabaseView.h"
@ -225,7 +226,9 @@ NSString *const SignalsViewControllerSegueShowIncomingCall = @"ShowIncomingCallS
}
- (void)settingsButtonPressed:(id)sender {
[self performSegueWithIdentifier:@"ShowAppSettingsSegue" sender:sender];
SettingsTableViewController *vc = [SettingsTableViewController new];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:vc];
[self presentViewController:navigationController animated:YES completion:nil];
}
- (UIViewController *)previewingContext:(id<UIViewControllerPreviewing>)previewingContext

Loading…
Cancel
Save