diff --git a/Ring/Ring/Calls/CallViewController.storyboard b/Ring/Ring/Calls/CallViewController.storyboard index 9a4ff90a318e2e143274ff7b5d55932d6a7ee248..c7804a409e91138d92d9fac9d9a4209946b3d023 100644 --- a/Ring/Ring/Calls/CallViewController.storyboard +++ b/Ring/Ring/Calls/CallViewController.storyboard @@ -171,7 +171,7 @@ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> </view> <color key="backgroundColor" red="0.99999600649999998" green="1" blue="1" alpha="0.17999999999999999" colorSpace="custom" customColorSpace="sRGB"/> - <blurEffect style="light"/> + <blurEffect style="regular"/> </visualEffectView> <imageView userInteractionEnabled="NO" alpha="0.0" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="left_arrow" translatesAutoresizingMaskIntoConstraints="NO" id="gWE-IS-b5p"> <rect key="frame" x="-17" y="393.66666666666669" width="60" height="70"/> @@ -306,7 +306,7 @@ <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> </view> <color key="backgroundColor" red="0.99999600649999998" green="1" blue="1" alpha="0.17661065924657535" colorSpace="custom" customColorSpace="sRGB"/> - <blurEffect style="light"/> + <blurEffect style="regular"/> </visualEffectView> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Dj8-CK-PQm" userLabel="Call Pulse"> <rect key="frame" x="117.66666666666669" y="130" width="140" height="140"/> diff --git a/Ring/Ring/Calls/CallViewController.swift b/Ring/Ring/Calls/CallViewController.swift index 11a453c5f6c5d8f1d6a7451bc32df5c2092d8a02..1fcf053e3d42486804619210bfab9c708d527add 100644 --- a/Ring/Ring/Calls/CallViewController.swift +++ b/Ring/Ring/Calls/CallViewController.swift @@ -88,15 +88,11 @@ class CallViewController: UIViewController, StoryboardBased, ViewModelBased { private let log = SwiftyBeaver.self - override var preferredStatusBarStyle: UIStatusBarStyle { - return self.viewModel.isAudioOnly ? .lightContent : .default - } - var tapGestureRecognizer: UITapGestureRecognizer! override func viewDidLoad() { super.viewDidLoad() - self.beforeIncomingVideo.backgroundColor = UIColor.white + self.beforeIncomingVideo.backgroundColor = UIColor.jamiBackgroundColor let callCurrent = self.viewModel.call?.state == .current self.setAvatarView(!callCurrent || self.viewModel.isAudioOnly) self.capturedVideoBlurEffect.isHidden = callCurrent @@ -117,6 +113,9 @@ class CallViewController: UIViewController, StoryboardBased, ViewModelBased { // The durationLabel and buttonsContainer alpha is set here to 0, and to 1 (with a duration) when appear on the screen to have a fade in animation self.durationLabel.alpha = 0 self.buttonsContainer.stackView.alpha = 0 + nameLabel.textColor = UIColor.jamiLabelColor + durationLabel.textColor = UIColor.jamiLabelColor + infoBottomLabel.textColor = UIColor.jamiLabelColor self.showAllInfo() self.setWhiteAvatarView() } @@ -177,7 +176,7 @@ class CallViewController: UIViewController, StoryboardBased, ViewModelBased { func setWhiteAvatarView() { self.callPulse.backgroundColor = UIColor.jamiCallPulse - self.avatarView.backgroundColor = UIColor.white + self.avatarView.backgroundColor = UIColor.jamiBackgroundColor } func initCallAnimation() { diff --git a/Ring/Ring/Calls/Conference/ContactPickerViewController.storyboard b/Ring/Ring/Calls/Conference/ContactPickerViewController.storyboard index 823fcb6e2f3dea2062f4139e67c195ac3767c7d6..2001f7538c087e660dc3f09005ba7d85ebf603d7 100644 --- a/Ring/Ring/Calls/Conference/ContactPickerViewController.storyboard +++ b/Ring/Ring/Calls/Conference/ContactPickerViewController.storyboard @@ -35,7 +35,7 @@ </visualEffectView> </subviews> </view> - <blurEffect style="extraLight"/> + <blurEffect style="regular"/> </visualEffectView> <searchBar contentMode="redraw" translatesAutoresizingMaskIntoConstraints="NO" id="ht5-JP-L4t"> <rect key="frame" x="0.0" y="44" width="414" height="44"/> diff --git a/Ring/Ring/Calls/Conference/ContactPickerViewController.swift b/Ring/Ring/Calls/Conference/ContactPickerViewController.swift index f4153bf224f56631bcf97c60aecfc39f3cb41dc1..7272ea071ca9f40ff023b82c59b6565ac084fc9b 100644 --- a/Ring/Ring/Calls/Conference/ContactPickerViewController.swift +++ b/Ring/Ring/Calls/Conference/ContactPickerViewController.swift @@ -34,6 +34,8 @@ class ContactPickerViewController: UIViewController, StoryboardBased, ViewModelB var viewModel: ContactPickerViewModel! fileprivate let disposeBag = DisposeBag() + var blurEffect: UIVisualEffectView? + override func viewDidLoad() { super.viewDidLoad() self.setupDataSources() @@ -43,6 +45,24 @@ class ContactPickerViewController: UIViewController, StoryboardBased, ViewModelB dismissGR.direction = UISwipeGestureRecognizer.Direction.down dismissGR.delegate = self self.searchBar.addGestureRecognizer(dismissGR) + self.setUPBlurBackground() + } + + func setUPBlurBackground() { + if #available(iOS 13.0, *) { + blurEffect = UIVisualEffectView(effect: UIBlurEffect(style: .systemChromeMaterial)) + } else { + blurEffect = UIVisualEffectView(effect: UIBlurEffect(style: .extraLight)) + } + if blurEffect != nil { + blurEffect!.frame = self.view.bounds + self.view.insertSubview(blurEffect!, at: 0) + blurEffect!.topAnchor.constraint(equalTo: searchBar.topAnchor, constant: 0).isActive = true + blurEffect!.bottomAnchor.constraint(equalTo: self.view.bottomAnchor, constant: 0).isActive = true + blurEffect!.leadingAnchor.constraint(equalTo: self.view.leadingAnchor, constant: 0).isActive = true + blurEffect!.trailingAnchor.constraint(equalTo: self.view.trailingAnchor, constant: 0).isActive = true + blurEffect!.translatesAutoresizingMaskIntoConstraints = false + } } @objc func remove(gesture: UISwipeGestureRecognizer) { @@ -148,7 +168,7 @@ class ContactPickerViewController: UIViewController, StoryboardBased, ViewModelB self.searchBar.returnKeyType = .done self.searchBar.autocapitalizationType = .none self.searchBar.tintColor = UIColor.jamiMain - self.searchBar.barTintColor = UIColor.jamiNavigationBar + self.searchBar.barTintColor = UIColor.jamiBackgroundSecondaryColor self.searchBar.rx.text.orEmpty .throttle(0.5, scheduler: MainScheduler.instance) .distinctUntilChanged() diff --git a/Ring/Ring/Constants/Generated/Images.swift b/Ring/Ring/Constants/Generated/Images.swift index 1fdfba0aae43677d62fca8960d5d53f0ef1d793c..0882d278ee582b231d7c0435ddce0d8d5b52b62b 100644 --- a/Ring/Ring/Constants/Generated/Images.swift +++ b/Ring/Ring/Constants/Generated/Images.swift @@ -27,7 +27,8 @@ internal enum Asset { internal static let audioOn = ImageAsset(name: "audio_on") internal static let audioRunning = ImageAsset(name: "audio_running") internal static let backButton = ImageAsset(name: "back_button") - internal static let backgroundRing = ImageAsset(name: "background_ring") + internal static let backgroundInputText = ColorAsset(name: "background_input_text") + internal static let backgroundMsgReceived = ColorAsset(name: "background_msg_received") internal static let blockIcon = ImageAsset(name: "block_icon") internal static let callButton = ImageAsset(name: "call_button") internal static let camera = ImageAsset(name: "camera") @@ -52,6 +53,7 @@ internal enum Asset { internal static let jamiIcon = ImageAsset(name: "jamiIcon") internal static let jamiLogo = ImageAsset(name: "jamiLogo") internal static let leftArrow = ImageAsset(name: "left_arrow") + internal static let messageBackgroundColor = ColorAsset(name: "message_background_color") internal static let moreSettings = ImageAsset(name: "more_settings") internal static let pauseCall = ImageAsset(name: "pause_call") internal static let phoneBook = ImageAsset(name: "phone_book") @@ -59,13 +61,18 @@ internal enum Asset { internal static let qrCodeScan = ImageAsset(name: "qr_code_scan") internal static let revokeDevice = ImageAsset(name: "revoke_device") internal static let ringLogo = ImageAsset(name: "ring_logo") + internal static let rowSelected = ColorAsset(name: "row_selected") internal static let scan = ImageAsset(name: "scan") internal static let sendButton = ImageAsset(name: "send_button") internal static let settings = ImageAsset(name: "settings") internal static let settingsIcon = ImageAsset(name: "settings_icon") + internal static let shadowColor = ColorAsset(name: "shadow_color") internal static let shareButton = ImageAsset(name: "share_button") internal static let stopCall = ImageAsset(name: "stop_call") internal static let switchCamera = ImageAsset(name: "switch_camera") + internal static let textBlueColor = ColorAsset(name: "text_blue_color") + internal static let textFieldBackgroundColor = ColorAsset(name: "text_field_background_color") + internal static let textSecondaryColor = ColorAsset(name: "text_secondary_color") internal static let unpauseCall = ImageAsset(name: "unpause_call") internal static let videoMuted = ImageAsset(name: "video_muted") internal static let videoRunning = ImageAsset(name: "video_running") diff --git a/Ring/Ring/Contact/ContactViewController.storyboard b/Ring/Ring/Contact/ContactViewController.storyboard index c55c6a932fd8544991a6819a71dd24f07d5620ca..9bdf7803793b894bfc8848fe5e100ba67682d9ff 100644 --- a/Ring/Ring/Contact/ContactViewController.storyboard +++ b/Ring/Ring/Contact/ContactViewController.storyboard @@ -11,7 +11,7 @@ <!--Contact View Controller--> <scene sceneID="ufa-hq-gXE"> <objects> - <viewController id="4oO-a5-k5Y" customClass="ContactViewController" customModule="Ring" customModuleProvider="target" sceneMemberID="viewController"> + <viewController extendedLayoutIncludesOpaqueBars="YES" id="4oO-a5-k5Y" customClass="ContactViewController" customModule="Ring" customModuleProvider="target" sceneMemberID="viewController"> <view key="view" contentMode="scaleToFill" id="l1v-RV-Jo2"> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> @@ -54,6 +54,7 @@ </constraints> <viewLayoutGuide key="safeArea" id="cTQ-BN-ANe"/> </view> + <extendedEdge key="edgesForExtendedLayout" bottom="YES"/> <connections> <outlet property="tableView" destination="Cjc-Dl-AsW" id="NB3-A4-6sy"/> </connections> diff --git a/Ring/Ring/Contact/ContactViewController.swift b/Ring/Ring/Contact/ContactViewController.swift index 7dca2072d8df34df931152b989a0982cc244abee..815389fadb045aa0004ceaed81880f67ada2f944 100644 --- a/Ring/Ring/Contact/ContactViewController.swift +++ b/Ring/Ring/Contact/ContactViewController.swift @@ -35,21 +35,19 @@ class ContactViewController: UIViewController, StoryboardBased, ViewModelBased { private var stretchyHeader: ProfileHeaderView! private let titleView = TitleView(frame: CGRect(x: 0, y: 0, width: 200, height: 50)) - override var preferredStatusBarStyle: UIStatusBarStyle { - return .default - } - override func viewDidLoad() { super.viewDidLoad() self.addHeaderView() self.setUpTableView() + view.backgroundColor = UIColor.jamiBackgroundColor + tableView.backgroundColor = UIColor.jamiBackgroundColor navigationItem.titleView = titleView } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) - self.navigationController?.navigationBar.layer.shadowColor = UIColor.clear.cgColor - self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: UIBarMetrics.default) + navigationController? + .navigationBar.layer.shadowColor = UIColor.clear.cgColor } private func addHeaderView() { diff --git a/Ring/Ring/Contact/ProfileHeaderView.swift b/Ring/Ring/Contact/ProfileHeaderView.swift index 14f47acddd85ad4928c689a389b77739a1eb51e6..1de306471783c130debee98ca737575954b26ae1 100644 --- a/Ring/Ring/Contact/ProfileHeaderView.swift +++ b/Ring/Ring/Contact/ProfileHeaderView.swift @@ -23,6 +23,13 @@ class ProfileHeaderView: GSKStretchyHeaderView { @IBOutlet var avatarView: UIView! @IBOutlet var displayName: UILabel! @IBOutlet var userName: UILabel! + @IBOutlet weak var background: UIView! + + override func willMove(toWindow newWindow: UIWindow?) { + super.willMove(toWindow: newWindow) + self.backgroundColor = UIColor.jamiBackgroundColor + background.backgroundColor = UIColor.jamiBackgroundColor + } override func didChangeStretchFactor(_ stretchFactor: CGFloat) { var alpha = CGFloatTranslateRange(stretchFactor, 0.2, 0.7, 0, 1) diff --git a/Ring/Ring/Contact/ProfileHeaderView.xib b/Ring/Ring/Contact/ProfileHeaderView.xib index b185f4979aa0ccebdf5806d660aea1b362dde70d..4a82a9f53f305f2888227a06d3d67c621d72fa33 100644 --- a/Ring/Ring/Contact/ProfileHeaderView.xib +++ b/Ring/Ring/Contact/ProfileHeaderView.xib @@ -1,11 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> - <device id="retina4_7" orientation="portrait"> - <adaptation id="fullscreen"/> - </device> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> + <device id="retina4_7" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> @@ -20,7 +18,7 @@ <rect key="frame" x="20" y="45" width="335" height="170"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="O5s-f8-qTg"> - <rect key="frame" x="117" y="0.0" width="100" height="100"/> + <rect key="frame" x="117.5" y="0.0" width="100" height="100"/> <constraints> <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="100" id="0bW-FE-CyE"/> <constraint firstAttribute="width" constant="100" id="3zC-80-Zmb"/> @@ -73,9 +71,11 @@ </userDefinedRuntimeAttributes> <connections> <outlet property="avatarView" destination="O5s-f8-qTg" id="37V-MG-dre"/> + <outlet property="background" destination="qRJ-Vm-D2L" id="xgo-qd-4CJ"/> <outlet property="displayName" destination="pXf-5b-Ea7" id="XwT-cN-xyc"/> <outlet property="userName" destination="RXO-IT-XHT" id="tuJ-tQ-OQZ"/> </connections> + <point key="canvasLocation" x="138" y="121"/> </view> </objects> </document> diff --git a/Ring/Ring/Dialpad/DialpadViewController.swift b/Ring/Ring/Dialpad/DialpadViewController.swift index aced5e144742908f286f90b043749675fba063b8..a4d0cb5ff5cda22b0ad513d07f276f280a9c7bc0 100644 --- a/Ring/Ring/Dialpad/DialpadViewController.swift +++ b/Ring/Ring/Dialpad/DialpadViewController.swift @@ -40,6 +40,8 @@ class DialpadViewController: UIViewController, StoryboardBased, ViewModelBased { override func viewDidLoad() { super.viewDidLoad() + view.backgroundColor = UIColor.jamiBackgroundColor + collectionView.backgroundColor = UIColor.jamiBackgroundColor self.applyL10n() let device = UIDevice.modelName if device == "iPhone 5" || device == "iPhone 5c" || device == "iPhone 5s" || device == "iPhone SE" { @@ -111,7 +113,9 @@ extension DialpadViewController: UICollectionViewDelegate, UICollectionViewDataS cell.contentView.subviews.forEach { (view) in view.removeFromSuperview() } - let label = UILabel.init(frame: CGRect(x: 0, y: 0, width: 70, height: 70)) + let originX = (cell.bounds.size.width - 70) * 0.5 + let label = UILabel.init(frame: CGRect(x: originX, y: 0, + width: 70, height: 70)) label.cornerRadius = 35 label.backgroundColor = UIColor(red: 204, green: 204, blue: 204, alpha: 1) label.textAlignment = .center diff --git a/Ring/Ring/EditProfileViewController.swift b/Ring/Ring/EditProfileViewController.swift index 669920071024f06a7aae8113d21aa199ce173b1a..3c03368966e6de495bd9d3a6f514ca7c74c4ca78 100644 --- a/Ring/Ring/EditProfileViewController.swift +++ b/Ring/Ring/EditProfileViewController.swift @@ -33,10 +33,6 @@ class EditProfileViewController: UIViewController, UITextFieldDelegate, UIImageP var model: EditProfileViewModel! fileprivate let disposeBag = DisposeBag() - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } - // MARK: - functions override func viewDidLoad() { diff --git a/Ring/Ring/Extensions/UIColor+Ring.swift b/Ring/Ring/Extensions/UIColor+Ring.swift index 1c175e93cbe228713093d8940f3122d19eb6ccad..752b2b0b0bc58fdb0e5be0d8be5595080b18d2af 100644 --- a/Ring/Ring/Extensions/UIColor+Ring.swift +++ b/Ring/Ring/Extensions/UIColor+Ring.swift @@ -80,14 +80,95 @@ extension UIColor { static let jamiMsgCellEmoji = UIColor(red: 0, green: 0, blue: 0, alpha: 0) static let jamiMsgCellSent = UIColor(hex: 0x367BC1, alpha: 1.0) static let jamiMsgCellSentText = UIColor(red: 255, green: 255, blue: 255, alpha: 1.0) - static let jamiMsgCellReceived = UIColor(red: 231, green: 235, blue: 235, alpha: 1.0) + static var jamiMsgCellReceived: UIColor { + if #available(iOS 11.0, *) { + return UIColor(named: "background_msg_received") ?? UIColor(red: 231, green: 235, blue: 235, alpha: 1.0) + } else { + return UIColor(red: 231, green: 235, blue: 235, alpha: 1.0) + } + } + + static var jamiTextBlue: UIColor { + if #available(iOS 11.0, *) { + return UIColor(named: "text_blue_color") ?? UIColor(red: 231, green: 235, blue: 235, alpha: 1.0) + } else { + return UIColor(red: 31, green: 73, blue: 113, alpha: 1.0) + } + } + + static var jamiTextSecondary: UIColor { + if #available(iOS 11.0, *) { + return UIColor(named: "text_secondary_color") ?? UIColor(red: 0, green: 0, blue: 0, alpha: 0.5) + } else { + return UIColor(red: 0, green: 0, blue: 0, alpha: 0.5) + } + } + + static var jamiInputTextBackground: UIColor { + if #available(iOS 11.0, *) { + return UIColor(named: "background_input_text") ?? UIColor(red: 255, green: 255, blue: 255, alpha: 0.57) + } else { + return UIColor(red: 255, green: 255, blue: 255, alpha: 0.57) + } + } + static let jamiMsgCellReceivedText = UIColor(red: 48, green: 48, blue: 48, alpha: 1.0) static let jamiMsgCellTimeText = UIColor(red: 128, green: 128, blue: 128, alpha: 1.0) - static let jamiMsgBackground = UIColor(red: 252, green: 252, blue: 252, alpha: 1.0) - static let jamiMsgTextFieldBackground = UIColor(red: 252, green: 252, blue: 252, alpha: 0) + + static var jamiMsgBackground: UIColor { + if #available(iOS 11.0, *) { + return UIColor(named: "message_background_color") ?? UIColor(red: 252, green: 252, blue: 252, alpha: 1.0) + } else { + return UIColor(red: 252, green: 252, blue: 252, alpha: 1.0) + } + } + + static var jamiMsgTextFieldBackground: UIColor { + if #available(iOS 11.0, *) { + return UIColor(named: "text_field_background_color") ?? UIColor(red: 252, green: 252, blue: 252, alpha: 0) + } else { + return UIColor(red: 252, green: 252, blue: 252, alpha: 0) + } + } static let jamiMsgTextFieldBorder = UIColor(red: 220, green: 220, blue: 220, alpha: 1.0) - static let jamiUITableViewCellSelection = UIColor(red: 209, green: 210, blue: 210, alpha: 1.0) - static let jamiNavigationBar = UIColor(red: 235, green: 235, blue: 235, alpha: 1.0) + static var jamiUITableViewCellSelection: UIColor { + if #available(iOS 11.0, *) { + return UIColor(named: "row_selected") ?? UIColor(red: 209, green: 210, blue: 210, alpha: 1.0) + } else { + return UIColor(red: 209, green: 210, blue: 210, alpha: 1.0) + } + } + static var jamiNavigationBarShadow: UIColor { + if #available(iOS 11.0, *) { + return UIColor(named: "shadow_color") ?? UIColor.black + } else { + return UIColor.black + } + } + + static var jamiBackgroundColor: UIColor { + if #available(iOS 13.0, *) { + return UIColor.systemBackground + } else { + return UIColor.white + } + } + + static var jamiBackgroundSecondaryColor: UIColor { + if #available(iOS 13.0, *) { + return UIColor.secondarySystemBackground + } else { + return UIColor(red: 235, green: 235, blue: 235, alpha: 1.0) + } + } + + static var jamiLabelColor: UIColor { + if #available(iOS 13.0, *) { + return UIColor.label + } else { + return UIColor.black + } + } static let jamiCallPulse = UIColor(hex: 0x039FDF, alpha: 1.0) static let jamiDefaultAvatar = UIColor(hex: 0x039FDF, alpha: 1.0) static let jamiSuccess = UIColor(hex: 0x00b20b, alpha: 1.0) diff --git a/Ring/Ring/Extensions/UIViewController+Ring.swift b/Ring/Ring/Extensions/UIViewController+Ring.swift index 428970bbfd5ca941a21c773cf8e05a9758879b7a..7fcf6e14b9b7fa2f300f2c387a238d203df918d8 100644 --- a/Ring/Ring/Extensions/UIViewController+Ring.swift +++ b/Ring/Ring/Extensions/UIViewController+Ring.swift @@ -124,13 +124,13 @@ extension UIViewController { } func configureRingNavigationBar() { - self.navigationController?.navigationBar.barTintColor = UIColor.jamiNavigationBar - self.navigationController?.navigationBar.layer.shadowColor = UIColor.black.cgColor - self.navigationController?.navigationBar.layer.shadowOffset = CGSize(width: 0.0, height: 2.5) + self.navigationController?.navigationBar.barStyle = .default + self.navigationController?.navigationBar.isTranslucent = true + self.navigationController?.navigationBar.layer.shadowColor = UIColor.jamiNavigationBarShadow.cgColor + self.navigationController?.navigationBar.layer.shadowOffset = CGSize(width: 0.0, height: 1.5) self.navigationController?.navigationBar.layer.shadowOpacity = 0.2 self.navigationController?.navigationBar.layer.shadowRadius = 3 self.navigationController?.navigationBar.layer.masksToBounds = false - self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: UIBarMetrics.default) self.navigationController?.navigationBar.shadowImage = UIImage() let textAttributes = [NSAttributedString.Key.foregroundColor: UIColor.jamiMain] self.navigationController?.navigationBar.titleTextAttributes = textAttributes @@ -138,9 +138,9 @@ extension UIViewController { } func configureWalkrhroughNavigationBar() { - let attrPortrait = [NSAttributedString.Key.foregroundColor: UIColor(red: 0, green: 0, blue: 0, alpha: 0.5), + let attrPortrait = [NSAttributedString.Key.foregroundColor: UIColor.jamiTextSecondary, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 31, weight: .thin)] - let attrLandscape = [NSAttributedString.Key.foregroundColor: UIColor(red: 0, green: 0, blue: 0, alpha: 0.5), + let attrLandscape = [NSAttributedString.Key.foregroundColor: UIColor.jamiTextSecondary, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 20, weight: .regular)] let isPortrait = UIScreen.main.bounds.size.width < UIScreen.main.bounds.size.height self.navigationController? diff --git a/Ring/Ring/Features/ContactRequests/ContactRequestsViewController.storyboard b/Ring/Ring/Features/ContactRequests/ContactRequestsViewController.storyboard index b166a90f0084539d414208f6c088d79d37942107..33a20691307723a05f73f47ca0eedc1aa084c572 100644 --- a/Ring/Ring/Features/ContactRequests/ContactRequestsViewController.storyboard +++ b/Ring/Ring/Features/ContactRequests/ContactRequestsViewController.storyboard @@ -1,11 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="gUS-mM-rdY"> - <device id="retina4_7" orientation="portrait"> - <adaptation id="fullscreen"/> - </device> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="gUS-mM-rdY"> + <device id="retina4_7" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <scenes> @@ -22,14 +20,14 @@ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="bPe-Vn-J7U"> - <rect key="frame" x="0.0" y="20" width="375" height="647"/> + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> </tableView> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cXe-K6-eM8"> - <rect key="frame" x="0.0" y="20" width="375" height="647"/> + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="No invitations" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pSV-RV-i1C"> - <rect key="frame" x="135.5" y="313" width="104" height="21"/> + <rect key="frame" x="135.5" y="323" width="104" height="21"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/> <nil key="highlightedColor"/> @@ -54,7 +52,6 @@ <constraint firstItem="bPe-Vn-J7U" firstAttribute="leading" secondItem="m1T-eD-duJ" secondAttribute="leading" id="jOx-2Z-yoO"/> </constraints> </view> - <extendedEdge key="edgesForExtendedLayout" bottom="YES"/> <navigationItem key="navigationItem" id="dMs-kf-EuK"/> <connections> <outlet property="noInvitationsPlaceholder" destination="cXe-K6-eM8" id="fuk-gt-pdZ"/> diff --git a/Ring/Ring/Features/ContactRequests/ContactRequestsViewController.swift b/Ring/Ring/Features/ContactRequests/ContactRequestsViewController.swift index ed4349ee27b8ad79cb2edb36b277d8b4e04c1710..4cfd1d46c78362b72655935048d0e2797ef2a1b3 100644 --- a/Ring/Ring/Features/ContactRequests/ContactRequestsViewController.swift +++ b/Ring/Ring/Features/ContactRequests/ContactRequestsViewController.swift @@ -37,12 +37,13 @@ class ContactRequestsViewController: UIViewController, StoryboardBased, ViewMode fileprivate let cellIdentifier = "ContactRequestCell" fileprivate let log = SwiftyBeaver.self - override var preferredStatusBarStyle: UIStatusBarStyle { - return .default - } - override func viewDidLoad() { super.viewDidLoad() + self.view.backgroundColor = UIColor.jamiBackgroundColor + self.tableView.backgroundColor = UIColor.jamiBackgroundColor + noInvitationsPlaceholder.backgroundColor = UIColor.jamiBackgroundColor + noRequestsLabel.backgroundColor = UIColor.jamiBackgroundColor + noRequestsLabel.textColor = UIColor.jamiLabelColor self.configureRingNavigationBar() self.tableView.rx.modelSelected(ContactRequestItem.self) diff --git a/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.storyboard b/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.storyboard index bdbd0bc454da6de39ecee2cacfc2259b3694424a..14376b22c7925921922e6bfdacbd6734e21838a5 100644 --- a/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.storyboard +++ b/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.storyboard @@ -11,11 +11,25 @@ <!--Conversation View Controller--> <scene sceneID="2Fj-m2-pCD"> <objects> - <viewController hidesBottomBarWhenPushed="YES" id="O1m-sW-gim" customClass="ConversationViewController" customModule="Ring" customModuleProvider="target" sceneMemberID="viewController"> + <viewController extendedLayoutIncludesOpaqueBars="YES" hidesBottomBarWhenPushed="YES" id="O1m-sW-gim" customClass="ConversationViewController" customModule="Ring" customModuleProvider="target" sceneMemberID="viewController"> <view key="view" contentMode="scaleToFill" id="lhx-ny-Zct"> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> + <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="yc2-Jn-6vm"> + <rect key="frame" x="0.0" y="-100" width="375" height="767"/> + <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> + <prototypes> + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="MessageCell" id="Cd7-Fm-IM5"> + <rect key="frame" x="0.0" y="28" width="375" height="44"/> + <autoresizingMask key="autoresizingMask"/> + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Cd7-Fm-IM5" id="TOb-Hu-RG9"> + <rect key="frame" x="0.0" y="0.0" width="375" height="44"/> + <autoresizingMask key="autoresizingMask"/> + </tableViewCellContentView> + </tableViewCell> + </prototypes> + </tableView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5cj-ge-3dv"> <rect key="frame" x="0.0" y="0.0" width="375" height="60"/> <color key="backgroundColor" red="0.88391119240000005" green="0.82437592739999999" blue="0.76125866170000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> @@ -32,20 +46,6 @@ <color key="tintColor" red="0.1215686275" green="0.28627450980000002" blue="0.4431372549" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <state key="normal" title="Navigate to call"/> </button> - <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="yc2-Jn-6vm"> - <rect key="frame" x="0.0" y="60" width="375" height="607"/> - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> - <prototypes> - <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="MessageCell" id="Cd7-Fm-IM5"> - <rect key="frame" x="0.0" y="28" width="375" height="44"/> - <autoresizingMask key="autoresizingMask"/> - <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Cd7-Fm-IM5" id="TOb-Hu-RG9"> - <rect key="frame" x="0.0" y="0.0" width="375" height="44"/> - <autoresizingMask key="autoresizingMask"/> - </tableViewCellContentView> - </tableViewCell> - </prototypes> - </tableView> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6Wq-EJ-CAF"> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <subviews> @@ -54,48 +54,45 @@ <color key="color" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/> </activityIndicatorView> </subviews> - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <constraints> <constraint firstItem="NYW-Ie-8yB" firstAttribute="centerY" secondItem="6Wq-EJ-CAF" secondAttribute="centerY" id="I23-W6-yIz"/> <constraint firstItem="NYW-Ie-8yB" firstAttribute="centerX" secondItem="6Wq-EJ-CAF" secondAttribute="centerX" id="vB4-hR-9sj"/> </constraints> </view> <visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XRu-HM-jhQ"> - <rect key="frame" x="0.0" y="640" width="375" height="27"/> + <rect key="frame" x="0.0" y="641" width="375" height="26"/> <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="lK5-Aw-CC5"> - <rect key="frame" x="0.0" y="0.0" width="375" height="27"/> + <rect key="frame" x="0.0" y="0.0" width="375" height="26"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> </view> <constraints> - <constraint firstAttribute="height" constant="27" id="b0Q-Xd-v7V"/> + <constraint firstAttribute="height" constant="26" id="b0Q-Xd-v7V"/> </constraints> - <blurEffect style="extraLight"/> + <blurEffect style="regular"/> </visualEffectView> </subviews> - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <constraints> <constraint firstItem="ehB-ol-cdx" firstAttribute="leading" secondItem="lhx-ny-Zct" secondAttribute="leading" id="AUO-95-xlZ"/> <constraint firstItem="XRu-HM-jhQ" firstAttribute="bottom" secondItem="yc2-Jn-6vm" secondAttribute="bottom" id="D1h-vM-lOK"/> <constraint firstAttribute="trailing" secondItem="6Wq-EJ-CAF" secondAttribute="trailing" id="EuA-fk-PFm"/> <constraint firstAttribute="bottom" secondItem="6Wq-EJ-CAF" secondAttribute="bottom" id="QKw-Wp-ff0"/> - <constraint firstItem="ehB-ol-cdx" firstAttribute="top" secondItem="mrp-Ty-hZO" secondAttribute="top" id="R8w-E8-UAR"/> <constraint firstItem="yc2-Jn-6vm" firstAttribute="leading" secondItem="lhx-ny-Zct" secondAttribute="leading" id="RmT-dh-QdK"/> <constraint firstAttribute="trailing" secondItem="yc2-Jn-6vm" secondAttribute="trailing" id="Vbp-Qr-Bjn"/> <constraint firstItem="XRu-HM-jhQ" firstAttribute="centerX" secondItem="yc2-Jn-6vm" secondAttribute="centerX" id="Y16-31-gDX"/> <constraint firstItem="5cj-ge-3dv" firstAttribute="leading" secondItem="ehB-ol-cdx" secondAttribute="leading" id="ZMK-xT-VM8"/> + <constraint firstItem="yc2-Jn-6vm" firstAttribute="top" secondItem="mrp-Ty-hZO" secondAttribute="top" constant="-100" id="a1b-Sx-HXo"/> <constraint firstItem="5cj-ge-3dv" firstAttribute="trailing" secondItem="ehB-ol-cdx" secondAttribute="trailing" id="adg-fs-d5i"/> <constraint firstItem="5cj-ge-3dv" firstAttribute="top" secondItem="ehB-ol-cdx" secondAttribute="top" id="bMn-Xz-w1J"/> <constraint firstItem="5cj-ge-3dv" firstAttribute="bottom" secondItem="ehB-ol-cdx" secondAttribute="bottom" id="bi2-5t-Ueh"/> <constraint firstAttribute="trailing" secondItem="ehB-ol-cdx" secondAttribute="trailing" id="hsT-qM-JJP"/> - <constraint firstItem="yc2-Jn-6vm" firstAttribute="top" secondItem="ehB-ol-cdx" secondAttribute="bottom" id="iIZ-h0-wyd"/> <constraint firstAttribute="bottom" secondItem="yc2-Jn-6vm" secondAttribute="bottom" id="m6U-Gp-jhl"/> + <constraint firstItem="5cj-ge-3dv" firstAttribute="top" secondItem="mrp-Ty-hZO" secondAttribute="top" id="ucp-wl-kSP"/> <constraint firstItem="6Wq-EJ-CAF" firstAttribute="top" secondItem="lhx-ny-Zct" secondAttribute="top" id="v3Q-NK-vb1"/> <constraint firstItem="XRu-HM-jhQ" firstAttribute="width" secondItem="yc2-Jn-6vm" secondAttribute="width" id="vBi-yc-6H9"/> <constraint firstItem="6Wq-EJ-CAF" firstAttribute="leading" secondItem="lhx-ny-Zct" secondAttribute="leading" id="was-ym-C9C"/> </constraints> <viewLayoutGuide key="safeArea" id="mrp-Ty-hZO"/> </view> - <extendedEdge key="edgesForExtendedLayout"/> <connections> <outlet property="callButtonHeightConstraint" destination="e7R-TC-NQ2" id="5uM-Sy-1EZ"/> <outlet property="currentCallButton" destination="ehB-ol-cdx" id="hXv-aJ-8DN"/> diff --git a/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.swift b/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.swift index cd50c74ef61764af2f727f5588f210e93d485809..f66daec84d6a2a19c93cc027e49f2378f5bca453 100644 --- a/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.swift +++ b/Ring/Ring/Features/Conversations/Conversation/ConversationViewController.swift @@ -53,10 +53,6 @@ class ConversationViewController: UIViewController, @IBOutlet weak var scanButtonLeadingConstraint: NSLayoutConstraint! @IBOutlet weak var callButtonHeightConstraint: NSLayoutConstraint! - override var preferredStatusBarStyle: UIStatusBarStyle { - return .default - } - var keyboardDismissTapRecognizer: UITapGestureRecognizer! func setIsComposing(isComposing: Bool) { @@ -101,6 +97,12 @@ class ConversationViewController: UIViewController, self.viewModel.setIsComposingMsg(isComposing: false) } + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + self.navigationController?.navigationBar.setBackgroundImage(nil, for: UIBarMetrics.default) + self.navigationController?.navigationBar.layer.shadowColor = UIColor.jamiNavigationBarShadow.cgColor + } + func importDocument() { let documentPicker = UIDocumentPickerViewController(documentTypes: ["public.item"], in: .import) documentPicker.delegate = self @@ -480,6 +482,7 @@ class ConversationViewController: UIViewController, .bind(onNext: { [weak self] _ in self?.contactTapped() }).disposed(by: disposeBag) + titleView.backgroundColor = UIColor.clear self.navigationItem.titleView = titleView } @@ -492,8 +495,8 @@ class ConversationViewController: UIViewController, func setupUI() { self.messageAccessoryView.sendButton.contentVerticalAlignment = .fill self.messageAccessoryView.sendButton.contentHorizontalAlignment = .fill + spinnerView.backgroundColor = UIColor.jamiMsgBackground self.tableView.backgroundColor = UIColor.jamiMsgBackground - self.messageAccessoryView.backgroundColor = UIColor.jamiMsgTextFieldBackground self.view.backgroundColor = UIColor.jamiMsgTextFieldBackground if self.viewModel.isAccountSip { @@ -592,7 +595,6 @@ class ConversationViewController: UIViewController, } self?.currentCallButton.isHidden = false self?.currentCallLabel.isHidden = false - self?.currentCallLabel.blink() self?.callButtonHeightConstraint.constant = 60 } return @@ -600,7 +602,6 @@ class ConversationViewController: UIViewController, self?.currentCallButton.isHidden = true self?.currentCallLabel.isHidden = true self?.callButtonHeightConstraint.constant = 0 - self?.currentCallLabel.layer.removeAllAnimations() }).disposed(by: disposeBag) currentCallButton.rx.tap .throttle(0.5, scheduler: MainScheduler.instance) diff --git a/Ring/Ring/Features/Conversations/Conversation/MessageAccessoryView.swift b/Ring/Ring/Features/Conversations/Conversation/MessageAccessoryView.swift index 996b92f75bb379a794ec279e444d9f71f029e8a3..972df2bf9563ffb1c2d0493b416f70c4508c0edb 100644 --- a/Ring/Ring/Features/Conversations/Conversation/MessageAccessoryView.swift +++ b/Ring/Ring/Features/Conversations/Conversation/MessageAccessoryView.swift @@ -33,7 +33,6 @@ class MessageAccessoryView: UIView, NibLoadable, GrowingTextViewDelegate { @IBOutlet weak var shareButton: UIButton! @IBOutlet weak var cameraButton: UIButton! @IBOutlet weak var emojisButton: UIButton! - @IBOutlet weak var blurEffect: UIVisualEffectView! @IBOutlet weak var messageTextView: GrowingTextView! @IBOutlet weak var emojisButtonTrailingConstraint: NSLayoutConstraint! @IBOutlet weak var sendButtonLeftConstraint: NSLayoutConstraint! @@ -42,6 +41,8 @@ class MessageAccessoryView: UIView, NibLoadable, GrowingTextViewDelegate { var messageTextViewContent = Variable<String>("") weak var delegate: MessageAccessoryViewDelegate? + var blurEffect: UIVisualEffectView? + override open func didMoveToWindow() { self.setupMessageTextView() super.didMoveToWindow() @@ -54,6 +55,22 @@ class MessageAccessoryView: UIView, NibLoadable, GrowingTextViewDelegate { multiplier: 1) .isActive = true } + blurEffect?.removeFromSuperview() + if #available(iOS 13.0, *) { + blurEffect = UIVisualEffectView(effect: UIBlurEffect(style: .systemChromeMaterial)) + } else { + blurEffect = UIVisualEffectView(effect: UIBlurEffect(style: .extraLight)) + } + self.backgroundColor = UIColor.jamiBackgroundColor + if blurEffect != nil { + blurEffect!.frame = self.bounds + self.insertSubview(blurEffect!, at: 0) + blurEffect!.topAnchor.constraint(equalTo: messageTextView.topAnchor, constant: -12.0).isActive = true + blurEffect!.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: 40).isActive = true + blurEffect!.leadingAnchor.constraint(equalTo: self.leadingAnchor, constant: 0).isActive = true + blurEffect!.trailingAnchor.constraint(equalTo: self.trailingAnchor, constant: 0).isActive = true + blurEffect!.translatesAutoresizingMaskIntoConstraints = false + } } func setupMessageTextView() { @@ -67,6 +84,7 @@ class MessageAccessoryView: UIView, NibLoadable, GrowingTextViewDelegate { self.messageTextView.maxHeight = 70 self.shareButton.tintColor = UIColor.jamiMain self.cameraButton.tintColor = UIColor.jamiMain + self.messageTextView.backgroundColor = UIColor.jamiInputTextBackground } func textViewDidChangeHeight(_ textView: GrowingTextView, height: CGFloat) { diff --git a/Ring/Ring/Features/Conversations/Conversation/MessageAccessoryView.xib b/Ring/Ring/Features/Conversations/Conversation/MessageAccessoryView.xib index aeb4b501c49de9d54d76152b730741d6a8601275..654444b44d698fab1f562b10c82b9c7e31009ec4 100644 --- a/Ring/Ring/Features/Conversations/Conversation/MessageAccessoryView.xib +++ b/Ring/Ring/Features/Conversations/Conversation/MessageAccessoryView.xib @@ -1,30 +1,20 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> - <device id="retina5_5" orientation="portrait"> - <adaptation id="fullscreen"/> - </device> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> + <device id="retina5_5" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <view contentMode="scaleToFill" id="Fja-dy-lIy" customClass="MessageAccessoryView" customModule="Ring" customModuleProvider="target"> - <rect key="frame" x="0.0" y="0.0" width="315" height="80"/> + <rect key="frame" x="0.0" y="0.0" width="315" height="60"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <subviews> - <visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UEs-8c-9hC"> - <rect key="frame" x="0.0" y="23.666666666666668" width="315" height="56.333333333333329"/> - <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="H5g-m6-my5"> - <rect key="frame" x="0.0" y="0.0" width="315" height="56.333333333333329"/> - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - </view> - <blurEffect style="extraLight"/> - </visualEffectView> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eZ6-Cr-td2" userLabel="Upload Button"> - <rect key="frame" x="6" y="35" width="34" height="34"/> + <rect key="frame" x="6" y="15" width="34" height="34"/> <constraints> <constraint firstAttribute="height" constant="34" id="efZ-wn-OTj"/> <constraint firstAttribute="width" constant="34" id="i8S-m1-tB0"/> @@ -32,7 +22,7 @@ <state key="normal" image="share_button"/> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Ifq-LQ-X1n" userLabel="Send Button"> - <rect key="frame" x="274" y="35" width="28" height="26"/> + <rect key="frame" x="274" y="15" width="28" height="26"/> <constraints> <constraint firstAttribute="height" constant="26" id="9PM-CR-8PT"/> <constraint firstAttribute="width" constant="28" id="cfz-1y-EkK"/> @@ -43,7 +33,7 @@ </state> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="w2N-XG-vU1" userLabel="Emojis Button"> - <rect key="frame" x="271" y="35" width="30" height="34"/> + <rect key="frame" x="271" y="15" width="30" height="34"/> <state key="normal"> <attributedString key="attributedTitle"> <fragment content="👍"> @@ -56,7 +46,7 @@ </state> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qCm-fg-RY1"> - <rect key="frame" x="46" y="35" width="34" height="34"/> + <rect key="frame" x="46" y="15" width="34" height="34"/> <constraints> <constraint firstAttribute="height" constant="34" id="0I0-Zq-DPq"/> <constraint firstAttribute="width" constant="34" id="Cby-RM-6vW"/> @@ -64,7 +54,7 @@ <state key="normal" image="camera"/> </button> <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="pNY-Qf-lFT" customClass="GrowingTextView" customModule="Ring" customModuleProvider="target" colorLabel="IBBuiltInLabel-Red"> - <rect key="frame" x="85" y="35" width="177" height="34"/> + <rect key="frame" x="85" y="15" width="177" height="34"/> <color key="backgroundColor" white="1" alpha="0.57138270547945202" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <accessibility key="accessibilityConfiguration" label="sdg"/> <constraints> @@ -74,9 +64,7 @@ <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/> </textView> </subviews> - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> - <constraint firstAttribute="bottom" secondItem="UEs-8c-9hC" secondAttribute="bottom" id="5zL-s3-P0H"/> <constraint firstItem="eZ6-Cr-td2" firstAttribute="leading" secondItem="qCm-fg-RY1" secondAttribute="leading" constant="-40" id="73K-N5-liQ"/> <constraint firstItem="w2N-XG-vU1" firstAttribute="top" secondItem="qCm-fg-RY1" secondAttribute="top" id="73b-aO-sT5"/> <constraint firstAttribute="trailing" secondItem="pNY-Qf-lFT" secondAttribute="trailing" constant="53" id="7c1-TB-XnJ"/> @@ -87,16 +75,12 @@ <constraint firstItem="w2N-XG-vU1" firstAttribute="bottom" secondItem="pNY-Qf-lFT" secondAttribute="bottom" id="WH1-PP-VfU"/> <constraint firstAttribute="trailing" secondItem="w2N-XG-vU1" secondAttribute="trailing" constant="14" id="Yyb-X2-nbp"/> <constraint firstAttribute="trailing" secondItem="Ifq-LQ-X1n" secondAttribute="trailing" constant="13" id="a3L-Tj-DTf"/> - <constraint firstItem="UEs-8c-9hC" firstAttribute="width" secondItem="Fja-dy-lIy" secondAttribute="width" id="d3l-7B-cW5"/> <constraint firstItem="w2N-XG-vU1" firstAttribute="bottom" secondItem="qCm-fg-RY1" secondAttribute="bottom" id="gxN-rs-CSX"/> - <constraint firstItem="UEs-8c-9hC" firstAttribute="leading" secondItem="Fja-dy-lIy" secondAttribute="leading" id="n3x-GA-Jbz"/> <constraint firstAttribute="leading" secondItem="eZ6-Cr-td2" secondAttribute="trailing" constant="-40" id="nXf-yT-cg0"/> - <constraint firstItem="UEs-8c-9hC" firstAttribute="top" secondItem="pNY-Qf-lFT" secondAttribute="top" constant="-11.5" id="vDE-3k-XJo"/> </constraints> <nil key="simulatedStatusBarMetrics"/> <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> <connections> - <outlet property="blurEffect" destination="UEs-8c-9hC" id="gdz-mH-WtC"/> <outlet property="cameraButton" destination="qCm-fg-RY1" id="8WG-DR-guy"/> <outlet property="emojisButton" destination="w2N-XG-vU1" id="7d7-4L-GBI"/> <outlet property="emojisButtonTrailingConstraint" destination="Yyb-X2-nbp" id="0wO-iY-lA3"/> @@ -110,8 +94,8 @@ </view> </objects> <resources> - <image name="camera" width="64" height="67"/> - <image name="send_button" width="102.40000152587891" height="102.40000152587891"/> - <image name="share_button" width="72" height="68"/> + <image name="camera" width="21.333333969116211" height="22.333333969116211"/> + <image name="send_button" width="64" height="64"/> + <image name="share_button" width="24" height="22.666666030883789"/> </resources> </document> diff --git a/Ring/Ring/Features/Conversations/SmartList/Cells/AccountItemView.swift b/Ring/Ring/Features/Conversations/SmartList/Cells/AccountItemView.swift index aa6be7489decd5dd64695eed42def343c8f707d1..5926b926143276dd084db29964a86db83af92709 100644 --- a/Ring/Ring/Features/Conversations/SmartList/Cells/AccountItemView.swift +++ b/Ring/Ring/Features/Conversations/SmartList/Cells/AccountItemView.swift @@ -42,5 +42,6 @@ class AccountItemView: UIView { addSubview(containerView) containerView.frame = self.bounds needMigrateLabel.text = L10n.Account.needMigration + nameLabel.textColor = UIColor.jamiLabelColor } } diff --git a/Ring/Ring/Features/Conversations/SmartList/SmartlistViewController.storyboard b/Ring/Ring/Features/Conversations/SmartList/SmartlistViewController.storyboard index 3239252b10b6d79bf307525be9fd1ef676a9e5b5..e3d4df2866023809ca3c3c936409c54167be9694 100644 --- a/Ring/Ring/Features/Conversations/SmartList/SmartlistViewController.storyboard +++ b/Ring/Ring/Features/Conversations/SmartList/SmartlistViewController.storyboard @@ -19,8 +19,38 @@ <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> + <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="1" sectionFooterHeight="1" translatesAutoresizingMaskIntoConstraints="NO" id="HFM-G6-hMN"> + <rect key="frame" x="0.0" y="-80" width="375" height="747"/> + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </tableView> + <tableView hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="1" sectionFooterHeight="1" translatesAutoresizingMaskIntoConstraints="NO" id="opE-y7-3Rm"> + <rect key="frame" x="0.0" y="-80" width="375" height="747"/> + <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> + </tableView> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HGv-QU-VSD"> + <rect key="frame" x="168" y="126" width="39.5" height="19.5"/> + <fontDescription key="fontDescription" style="UICTFontTextStyleCallout"/> + <nil key="textColor"/> + <nil key="highlightedColor"/> + </label> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="EvL-Bu-O1T"> + <rect key="frame" x="0.0" y="116" width="375" height="551"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="No conversations" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8bB-XU-6gh"> + <rect key="frame" x="121" y="265" width="133" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/> + <nil key="highlightedColor"/> + </label> + </subviews> + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> + <constraints> + <constraint firstItem="8bB-XU-6gh" firstAttribute="centerY" secondItem="EvL-Bu-O1T" secondAttribute="centerY" id="1R2-tE-dtX"/> + <constraint firstItem="8bB-XU-6gh" firstAttribute="centerX" secondItem="EvL-Bu-O1T" secondAttribute="centerX" id="PCa-ph-Sbp"/> + </constraints> + </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="e5o-cY-djH" userLabel="Network Alert View"> - <rect key="frame" x="0.0" y="56" width="375" height="56"/> + <rect key="frame" x="0.0" y="60" width="375" height="56"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HKv-H1-GYI" userLabel="Alert Labels View"> <rect key="frame" x="171" y="0.0" width="33" height="56"/> @@ -71,10 +101,10 @@ </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DKd-eF-L6f"> - <rect key="frame" x="0.0" y="0.0" width="375" height="56"/> + <rect key="frame" x="0.0" y="-106" width="375" height="166"/> <subviews> <searchBar contentMode="redraw" placeholder="Enter name..." translatesAutoresizingMaskIntoConstraints="NO" id="xPr-nI-I35"> - <rect key="frame" x="0.0" y="0.0" width="325" height="56"/> + <rect key="frame" x="0.0" y="110" width="325" height="56"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="56" id="4yw-AN-guZ"/> @@ -84,7 +114,7 @@ <textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" returnKeyType="done"/> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="number" keyPath="borderWidth"> - <real key="value" value="2"/> + <real key="value" value="0.0"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="color" keyPath="borderColor"> <color key="value" red="0.92156862745098034" green="0.92156862745098034" blue="0.92156862745098034" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> @@ -92,12 +122,12 @@ </userDefinedRuntimeAttributes> </searchBar> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RSG-bY-flb"> - <rect key="frame" x="325" y="8" width="40" height="40"/> + <rect key="frame" x="325" y="118" width="40" height="40"/> <color key="tintColor" red="0.2470588235" green="0.42745098040000001" blue="0.65490196079999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <state key="normal" image="phone_book"/> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Eta-uf-Ija"> - <rect key="frame" x="325" y="8" width="40" height="40"/> + <rect key="frame" x="325" y="118" width="40" height="40"/> <constraints> <constraint firstAttribute="width" constant="40" id="eb8-7R-X3e"/> <constraint firstAttribute="height" constant="40" id="j8h-fg-qMp"/> @@ -111,47 +141,15 @@ <constraint firstItem="Eta-uf-Ija" firstAttribute="top" secondItem="RSG-bY-flb" secondAttribute="top" id="C2I-Kv-faQ"/> <constraint firstItem="Eta-uf-Ija" firstAttribute="centerY" secondItem="xPr-nI-I35" secondAttribute="centerY" id="Epv-9a-Rkg"/> <constraint firstAttribute="trailing" secondItem="Eta-uf-Ija" secondAttribute="trailing" constant="10" id="O7M-He-7UH"/> + <constraint firstAttribute="height" constant="166" id="P1R-qO-qwd"/> <constraint firstItem="Eta-uf-Ija" firstAttribute="leading" secondItem="xPr-nI-I35" secondAttribute="trailing" id="SnW-M7-wRB"/> <constraint firstItem="Eta-uf-Ija" firstAttribute="trailing" secondItem="RSG-bY-flb" secondAttribute="trailing" id="fK5-6j-fKX"/> <constraint firstItem="Eta-uf-Ija" firstAttribute="leading" secondItem="RSG-bY-flb" secondAttribute="leading" id="ggB-jL-tbn"/> <constraint firstItem="xPr-nI-I35" firstAttribute="leading" secondItem="DKd-eF-L6f" secondAttribute="leading" id="m1O-ZV-Pkx"/> - <constraint firstItem="xPr-nI-I35" firstAttribute="top" secondItem="DKd-eF-L6f" secondAttribute="top" id="nlW-pc-ggm"/> <constraint firstItem="Eta-uf-Ija" firstAttribute="bottom" secondItem="RSG-bY-flb" secondAttribute="bottom" id="wOa-Ne-n5e"/> <constraint firstAttribute="bottom" secondItem="xPr-nI-I35" secondAttribute="bottom" id="xcp-FC-G0l"/> </constraints> </view> - <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="HFM-G6-hMN"> - <rect key="frame" x="0.0" y="112" width="375" height="555"/> - <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> - </tableView> - <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="EvL-Bu-O1T"> - <rect key="frame" x="0.0" y="112" width="375" height="555"/> - <subviews> - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="No conversations" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8bB-XU-6gh"> - <rect key="frame" x="121" y="267" width="133" height="21"/> - <fontDescription key="fontDescription" type="system" pointSize="17"/> - <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/> - <nil key="highlightedColor"/> - </label> - </subviews> - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> - <constraints> - <constraint firstItem="8bB-XU-6gh" firstAttribute="centerY" secondItem="EvL-Bu-O1T" secondAttribute="centerY" id="1R2-tE-dtX"/> - <constraint firstItem="8bB-XU-6gh" firstAttribute="centerX" secondItem="EvL-Bu-O1T" secondAttribute="centerX" id="PCa-ph-Sbp"/> - </constraints> - </view> - <tableView hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="1" sectionFooterHeight="1" translatesAutoresizingMaskIntoConstraints="NO" id="opE-y7-3Rm"> - <rect key="frame" x="0.0" y="112" width="375" height="555"/> - <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> - <label key="tableHeaderView" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="4Yu-Fe-ixq"> - <rect key="frame" x="0.0" y="0.0" width="375" height="24"/> - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> - <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> - <fontDescription key="fontDescription" type="system" pointSize="14"/> - <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/> - <nil key="highlightedColor"/> - </label> - </tableView> <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="79Q-fh-vhV"> <rect key="frame" x="285" y="577" width="60" height="60"/> <subviews> @@ -178,7 +176,7 @@ </userDefinedRuntimeAttributes> </button> </subviews> - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <constraints> <constraint firstAttribute="height" constant="60" id="GEI-dw-9ar"/> <constraint firstAttribute="trailing" secondItem="k8G-Me-4BI" secondAttribute="trailing" id="a7d-Q1-Fvz"/> @@ -202,16 +200,18 @@ <constraint firstItem="cfq-zl-uux" firstAttribute="top" secondItem="79Q-fh-vhV" secondAttribute="bottom" constant="30" id="8G6-0D-3ma"/> <constraint firstItem="HFM-G6-hMN" firstAttribute="leading" secondItem="2dZ-8A-4nq" secondAttribute="leading" id="8tr-Rd-1kr"/> <constraint firstItem="DKd-eF-L6f" firstAttribute="leading" secondItem="2dZ-8A-4nq" secondAttribute="leading" id="9fi-2r-wE8"/> + <constraint firstItem="HGv-QU-VSD" firstAttribute="centerX" secondItem="2dZ-8A-4nq" secondAttribute="centerX" id="A6i-gd-82k"/> <constraint firstAttribute="trailing" secondItem="DKd-eF-L6f" secondAttribute="trailing" id="AhH-s9-pfe"/> <constraint firstAttribute="trailing" secondItem="opE-y7-3Rm" secondAttribute="trailing" id="D0f-nM-KEs"/> + <constraint firstItem="HFM-G6-hMN" firstAttribute="top" secondItem="sbJ-yn-t3e" secondAttribute="bottom" constant="-80" id="TVk-tz-qtF"/> <constraint firstItem="cfq-zl-uux" firstAttribute="top" secondItem="EvL-Bu-O1T" secondAttribute="bottom" id="TsM-9H-eI1"/> <constraint firstItem="cfq-zl-uux" firstAttribute="top" secondItem="HFM-G6-hMN" secondAttribute="bottom" id="VfB-5H-uHq"/> - <constraint firstItem="HFM-G6-hMN" firstAttribute="top" secondItem="e5o-cY-djH" secondAttribute="bottom" id="Yn5-dO-Y5x"/> + <constraint firstItem="HGv-QU-VSD" firstAttribute="top" secondItem="e5o-cY-djH" secondAttribute="bottom" constant="10" id="XCA-fc-GKd"/> <constraint firstItem="EvL-Bu-O1T" firstAttribute="top" secondItem="e5o-cY-djH" secondAttribute="bottom" id="cCR-S3-3AW"/> <constraint firstAttribute="trailing" secondItem="79Q-fh-vhV" secondAttribute="trailing" constant="30" id="elh-uT-3vG"/> - <constraint firstItem="opE-y7-3Rm" firstAttribute="top" secondItem="e5o-cY-djH" secondAttribute="bottom" id="fgp-c6-UxE"/> - <constraint firstItem="DKd-eF-L6f" firstAttribute="top" secondItem="sbJ-yn-t3e" secondAttribute="bottom" id="gbl-PR-kL4"/> + <constraint firstItem="DKd-eF-L6f" firstAttribute="top" secondItem="sbJ-yn-t3e" secondAttribute="bottom" constant="-106" id="gbl-PR-kL4"/> <constraint firstAttribute="trailing" secondItem="e5o-cY-djH" secondAttribute="trailing" id="k9v-18-oxL"/> + <constraint firstItem="HFM-G6-hMN" firstAttribute="top" secondItem="opE-y7-3Rm" secondAttribute="top" id="kok-5h-ENq"/> <constraint firstItem="e5o-cY-djH" firstAttribute="top" secondItem="xPr-nI-I35" secondAttribute="bottom" id="mKv-lK-yDx"/> <constraint firstAttribute="trailing" secondItem="EvL-Bu-O1T" secondAttribute="trailing" id="nSK-QH-snj"/> <constraint firstItem="e5o-cY-djH" firstAttribute="leading" secondItem="2dZ-8A-4nq" secondAttribute="leading" id="rXu-fF-ESz"/> @@ -226,6 +226,7 @@ <outlet property="dialpadButton" destination="k8G-Me-4BI" id="Ij7-SF-nvZ"/> <outlet property="dialpadButtonShadow" destination="79Q-fh-vhV" id="VcA-wc-j6h"/> <outlet property="networkAlertLabel" destination="Fu7-Dr-XvA" id="0qV-lk-9mE"/> + <outlet property="networkAlertView" destination="e5o-cY-djH" id="uV5-WT-vai"/> <outlet property="networkAlertViewTopConstraint" destination="mKv-lK-yDx" id="bJk-Ie-hf6"/> <outlet property="noConversationLabel" destination="8bB-XU-6gh" id="n4g-mz-w7z"/> <outlet property="noConversationsView" destination="EvL-Bu-O1T" id="tVV-6a-4Xg"/> @@ -235,8 +236,9 @@ <outlet property="searchBar" destination="xPr-nI-I35" id="Y3U-rV-yfc"/> <outlet property="searchBarShadow" destination="DKd-eF-L6f" id="CKZ-ws-ag1"/> <outlet property="searchResultsTableView" destination="opE-y7-3Rm" id="F3g-9d-IQt"/> - <outlet property="searchTableViewLabel" destination="4Yu-Fe-ixq" id="dq3-QM-bfA"/> + <outlet property="searchTableViewLabel" destination="HGv-QU-VSD" id="cVs-pr-n1f"/> <outlet property="settingsButton" destination="iaz-fd-fEz" id="R2O-R8-BDk"/> + <outlet property="tableTopConstraint" destination="TVk-tz-qtF" id="lIj-Yu-ZL7"/> <outlet property="tableView" destination="HFM-G6-hMN" id="Gci-vk-ijr"/> </connections> </viewController> diff --git a/Ring/Ring/Features/Conversations/SmartList/SmartlistViewController.swift b/Ring/Ring/Features/Conversations/SmartList/SmartlistViewController.swift index f0c465a82751e93490847648cc130348f611c288..6a0a9f6289a2fb3a5dac65db86b55bbf0413984a 100644 --- a/Ring/Ring/Features/Conversations/SmartList/SmartlistViewController.swift +++ b/Ring/Ring/Features/Conversations/SmartList/SmartlistViewController.swift @@ -32,12 +32,15 @@ import QuartzCore //Constants private struct SmartlistConstants { static let smartlistRowHeight: CGFloat = 64.0 - static let tableHeaderViewHeight: CGFloat = 24.0 - static let firstSectionHeightForHeader: CGFloat = 31.0 //Compensate the offset due to the label on the top of the tableView - static let defaultSectionHeightForHeader: CGFloat = 55.0 + static let tableHeaderViewHeight: CGFloat = 142.0 + static let firstSectionHeightForHeader: CGFloat = 51.0 + static let networkAllerHeight: CGFloat = 56.0 + static let tableViewOffset: CGFloat = 80.0 + } // swiftlint:disable type_body_length +// swiftlint:disable file_length class SmartlistViewController: UIViewController, StoryboardBased, ViewModelBased { private let log = SwiftyBeaver.self @@ -53,6 +56,7 @@ class SmartlistViewController: UIViewController, StoryboardBased, ViewModelBased @IBOutlet weak var networkAlertLabel: UILabel! @IBOutlet weak var cellularAlertLabel: UILabel! @IBOutlet weak var networkAlertViewTopConstraint: NSLayoutConstraint! + @IBOutlet weak var tableTopConstraint: NSLayoutConstraint! @IBOutlet weak var settingsButton: UIButton! @IBOutlet weak var dialpadButton: UIButton! @IBOutlet weak var dialpadButtonShadow: UIView! @@ -60,6 +64,7 @@ class SmartlistViewController: UIViewController, StoryboardBased, ViewModelBased @IBOutlet weak var qrScanButton: UIButton! @IBOutlet weak var phoneBookButton: UIButton! @IBOutlet weak var scanButtonLeadingConstraint: NSLayoutConstraint! + @IBOutlet weak var networkAlertView: UIView! // account selection var accounPicker = UIPickerView() @@ -73,10 +78,6 @@ class SmartlistViewController: UIViewController, StoryboardBased, ViewModelBased private let contactPicker = CNContactPickerViewController() - override var preferredStatusBarStyle: UIStatusBarStyle { - return .default - } - // MARK: functions @IBAction func openScan() { self.viewModel.showQRCode() @@ -108,8 +109,13 @@ class SmartlistViewController: UIViewController, StoryboardBased, ViewModelBased override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) - self.navigationController?.navigationBar.layer.shadowColor = UIColor.clear.cgColor - self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: UIBarMetrics.default) + navigationController? + .navigationBar + .layer.shadowColor = UIColor.clear.cgColor + navigationController? + .navigationBar + .setBackgroundImage(UIImage(), + for: UIBarMetrics.default) self.navigationController?.navigationBar .titleTextAttributes = [NSAttributedString.Key.font: UIFont(name: "HelveticaNeue-Light", size: 25)!, NSAttributedString.Key.foregroundColor: UIColor.jamiMain] @@ -126,7 +132,15 @@ class SmartlistViewController: UIViewController, StoryboardBased, ViewModelBased // swiftlint:disable function_body_length func setupUI() { - dialpadButtonShadow.layer.shadowColor = UIColor.black.cgColor + view.backgroundColor = UIColor.jamiBackgroundColor + conversationsTableView.backgroundColor = UIColor.jamiBackgroundColor + searchResultsTableView.backgroundColor = UIColor.jamiBackgroundColor + noConversationsView.backgroundColor = UIColor.jamiBackgroundColor + noConversationLabel.backgroundColor = UIColor.jamiBackgroundColor + noConversationLabel.textColor = UIColor.jamiLabelColor + searchTableViewLabel.textColor = UIColor.jamiLabelColor + dialpadButtonShadow.backgroundColor = UIColor.jamiBackgroundSecondaryColor + dialpadButtonShadow.layer.shadowColor = UIColor.jamiLabelColor.cgColor dialpadButtonShadow.layer.shadowOffset = CGSize.zero dialpadButtonShadow.layer.shadowRadius = 1 dialpadButtonShadow.layer.shadowOpacity = 0.6 @@ -134,15 +148,21 @@ class SmartlistViewController: UIViewController, StoryboardBased, ViewModelBased self.viewModel.hideNoConversationsMessage .bind(to: self.noConversationsView.rx.isHidden) .disposed(by: disposeBag) - - self.networkAlertViewTopConstraint.constant = self.viewModel.networkConnectionState() == .none ? 0.0 : -56.0 + let isHidden = self.viewModel.networkConnectionState() == .none ? false : true + self.networkAlertViewTopConstraint.constant = !isHidden ? 0.0 : -SmartlistConstants.networkAllerHeight + tableTopConstraint.constant = !isHidden ? -(SmartlistConstants.tableViewOffset - SmartlistConstants.networkAllerHeight) : -SmartlistConstants.tableViewOffset + self.networkAlertView.isHidden = isHidden self.viewModel.connectionState .subscribe(onNext: { connectionState in - let newAlertHeight = connectionState == .none ? 0.0 : -56.0 - UIView.animate(withDuration: 0.25) { - self.networkAlertViewTopConstraint.constant = CGFloat(newAlertHeight) - self.view.layoutIfNeeded() + let newAlertHeight = connectionState == .none ? 0.0 : -SmartlistConstants.networkAllerHeight + let newTableViewTop = connectionState == .none ? -(SmartlistConstants.tableViewOffset - SmartlistConstants.networkAllerHeight) : -SmartlistConstants.tableViewOffset + let isHidden = connectionState == .none ? false : true + UIView.animate(withDuration: 0.25) { [weak self] in + self?.networkAlertViewTopConstraint.constant = CGFloat(newAlertHeight) + self?.tableTopConstraint.constant = CGFloat(newTableViewTop) + self?.view.layoutIfNeeded() } + self.networkAlertView.isHidden = isHidden }) .disposed(by: self.disposeBag) @@ -159,32 +179,33 @@ class SmartlistViewController: UIViewController, StoryboardBased, ViewModelBased generalSettingsButton.contentMode = .scaleAspectFill let settingsButtonItem = UIBarButtonItem(customView: generalSettingsButton) generalSettingsButton.rx.tap.throttle(0.5, scheduler: MainScheduler.instance) - .subscribe(onNext: { [unowned self] in - self.viewModel.showGeneralSettings() + .subscribe(onNext: { [weak self] in + self?.viewModel.showGeneralSettings() }) .disposed(by: self.disposeBag) qrScanButton.rx.tap.throttle(0.5, scheduler: MainScheduler.instance) - .subscribe(onNext: { [unowned self] in - self.openScan() + .subscribe(onNext: { [weak self] in + self?.openScan() }) .disposed(by: self.disposeBag) phoneBookButton.rx.tap.throttle(0.5, scheduler: MainScheduler.instance) - .subscribe(onNext: { [unowned self] in + .subscribe(onNext: { [weak self] in + guard let self = self else {return} self.contactPicker.delegate = self self.present(self.contactPicker, animated: true, completion: nil) }) .disposed(by: self.disposeBag) self.viewModel.currentAccountChanged .observeOn(MainScheduler.instance) - .subscribe(onNext: { [unowned self] currentAccount in + .subscribe(onNext: { [weak self] currentAccount in if let account = currentAccount { let accountSip = account.type == AccountType.sip - self.navigationItem + self?.navigationItem .rightBarButtonItem = accountSip ? nil : settingsButtonItem - self.dialpadButtonShadow.isHidden = !accountSip - self.phoneBookButton.isHidden = !accountSip - self.qrScanButton.isHidden = accountSip + self?.dialpadButtonShadow.isHidden = !accountSip + self?.phoneBookButton.isHidden = !accountSip + self?.qrScanButton.isHidden = accountSip } }).disposed(by: disposeBag) @@ -242,7 +263,7 @@ class SmartlistViewController: UIViewController, StoryboardBased, ViewModelBased func confugureAccountPicker() { view.addSubview(accountPickerTextView) accountPickerTextView.inputView = accounPicker - accounPicker.backgroundColor = .jamiNavigationBar + accounPicker.backgroundColor = .jamiBackgroundSecondaryColor self.viewModel.accounts .observeOn(MainScheduler.instance) .bind(to: accounPicker.rx.items(adapter: accountsAdapter)) @@ -280,7 +301,7 @@ class SmartlistViewController: UIViewController, StoryboardBased, ViewModelBased let flexibleBarButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonItem.SystemItem.flexibleSpace, target: self, action: nil) let addBarButton = UIBarButtonItem(customView: addAccountButton) let toolbar = UIToolbar() - toolbar.barTintColor = .jamiNavigationBar + toolbar.barTintColor = .jamiBackgroundSecondaryColor toolbar.isTranslucent = false toolbar.sizeToFit() toolbar.center = CGPoint(x: self.view.frame.width * 0.5, y: 200) @@ -367,6 +388,7 @@ class SmartlistViewController: UIViewController, StoryboardBased, ViewModelBased //Bind to ViewModel to show or hide the filtered results self.viewModel.isSearching.subscribe(onNext: { [unowned self] (isSearching) in self.searchResultsTableView.isHidden = !isSearching + self.searchTableViewLabel.isHidden = !isSearching }).disposed(by: disposeBag) //Deselect the rows @@ -389,20 +411,54 @@ class SmartlistViewController: UIViewController, StoryboardBased, ViewModelBased } func setupSearchBar() { - self.searchBar.returnKeyType = .done self.searchBar.autocapitalizationType = .none self.searchBar.tintColor = UIColor.jamiMain - self.searchBar.barTintColor = UIColor.jamiNavigationBar - - self.view.bringSubviewToFront(self.searchBarShadow) - - self.searchBarShadow.layer.shadowColor = UIColor.black.cgColor - self.searchBarShadow.layer.shadowOffset = CGSize(width: 0.0, height: 2.5) + searchBar.backgroundImage = UIImage() + searchBarShadow.backgroundColor = UIColor.clear + searchBar.backgroundColor = UIColor.clear + self.searchBarShadow.layer.shadowColor = UIColor.jamiNavigationBarShadow.cgColor + self.searchBarShadow.layer.shadowOffset = CGSize(width: 0.0, height: 1.5) self.searchBarShadow.layer.shadowOpacity = 0.2 self.searchBarShadow.layer.shadowRadius = 3 self.searchBarShadow.layer.masksToBounds = false + if #available(iOS 13.0, *) { + let visualEffectView = UIVisualEffectView(effect: UIBlurEffect(style: .systemChromeMaterial)) + visualEffectView.frame = searchBarShadow.bounds + visualEffectView.isUserInteractionEnabled = false + searchBarShadow.insertSubview(visualEffectView, at: 0) + visualEffectView.translatesAutoresizingMaskIntoConstraints = false + visualEffectView.widthAnchor.constraint(equalTo: self.view.widthAnchor, constant: 0).isActive = true + visualEffectView.trailingAnchor.constraint(equalTo: self.searchBarShadow.trailingAnchor, constant: 0).isActive = true + visualEffectView.leadingAnchor.constraint(equalTo: self.searchBarShadow.leadingAnchor, constant: 0).isActive = true + visualEffectView.topAnchor.constraint(equalTo: self.searchBarShadow.topAnchor, constant: 0).isActive = true + visualEffectView.bottomAnchor.constraint(equalTo: self.searchBarShadow.bottomAnchor, constant: 0).isActive = true + + } else { + let visualEffectView = UIVisualEffectView(effect: UIBlurEffect(style: .light)) + visualEffectView.frame = searchBarShadow.bounds + visualEffectView.isUserInteractionEnabled = false + let background = UIView() + background.frame = searchBarShadow.bounds + background.backgroundColor = UIColor(red: 245, green: 245, blue: 245, alpha: 1.0) + background.alpha = 0.7 + searchBarShadow.insertSubview(background, at: 0) + searchBarShadow.insertSubview(visualEffectView, at: 0) + background.translatesAutoresizingMaskIntoConstraints = false + visualEffectView.translatesAutoresizingMaskIntoConstraints = false + visualEffectView.widthAnchor.constraint(equalTo: self.view.widthAnchor, constant: 0).isActive = true + background.widthAnchor.constraint(equalTo: self.view.widthAnchor, constant: 0).isActive = true + visualEffectView.trailingAnchor.constraint(equalTo: self.searchBarShadow.trailingAnchor, constant: 0).isActive = true + background.trailingAnchor.constraint(equalTo: self.searchBarShadow.trailingAnchor, constant: 0).isActive = true + visualEffectView.leadingAnchor.constraint(equalTo: self.searchBarShadow.leadingAnchor, constant: 0).isActive = true + background.leadingAnchor.constraint(equalTo: self.searchBarShadow.leadingAnchor, constant: 0).isActive = true + visualEffectView.topAnchor.constraint(equalTo: self.searchBarShadow.topAnchor, constant: 0).isActive = true + background.topAnchor.constraint(equalTo: self.searchBarShadow.topAnchor, constant: 0).isActive = true + visualEffectView.bottomAnchor.constraint(equalTo: self.searchBarShadow.bottomAnchor, constant: 0).isActive = true + background.bottomAnchor.constraint(equalTo: self.searchBarShadow.bottomAnchor, constant: 0).isActive = true + } + //Bind the SearchBar to the ViewModel self.searchBar.rx.text.orEmpty .debounce(Durations.textFieldThrottlingDuration.value, scheduler: MainScheduler.instance) @@ -496,14 +552,20 @@ class SmartlistViewController: UIViewController, StoryboardBased, ViewModelBased } extension SmartlistViewController: UITableViewDelegate { + + func tableView(_ tableView: UITableView, willDisplayHeaderView view: UIView, forSection section: Int) { + guard let headerView = view as? UITableViewHeaderFooterView else { return } + headerView.tintColor = .clear + } + func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { if section == 0 { if tableView == self.conversationsTableView { - return 0 + return SmartlistConstants.tableHeaderViewHeight } - return SmartlistConstants.firstSectionHeightForHeader + return SmartlistConstants.tableHeaderViewHeight + SmartlistConstants.firstSectionHeightForHeader } else { - return SmartlistConstants.defaultSectionHeightForHeader + return SmartlistConstants.tableHeaderViewHeight } } diff --git a/Ring/Ring/Features/InitialLoading/InitialLoadingViewController.swift b/Ring/Ring/Features/InitialLoading/InitialLoadingViewController.swift index 64820b76450d2d2e315576478405cc54670c6947..e0268db7391ec1d78fdb943ba1677c693f654ed1 100644 --- a/Ring/Ring/Features/InitialLoading/InitialLoadingViewController.swift +++ b/Ring/Ring/Features/InitialLoading/InitialLoadingViewController.swift @@ -11,8 +11,8 @@ import Reusable final class InitialLoadingViewController: UIViewController, StoryboardBased { - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = UIColor.jamiBackgroundColor } - } diff --git a/Ring/Ring/Features/Me/LinkNewDeviceViewController.swift b/Ring/Ring/Features/Me/LinkNewDeviceViewController.swift index eed7867f0ed593c15c21df91b530b5ff383ab3be..ba6f15783cf347aed326790d57e202e420efba65 100644 --- a/Ring/Ring/Features/Me/LinkNewDeviceViewController.swift +++ b/Ring/Ring/Features/Me/LinkNewDeviceViewController.swift @@ -28,10 +28,6 @@ class LinkNewDeviceViewController: UIViewController, StoryboardBased, ViewModelB var viewModel: LinkNewDeviceViewModel! let disposeBag = DisposeBag() - override var preferredStatusBarStyle: UIStatusBarStyle { - return .default - } - override func viewDidLoad() { self.view.backgroundColor = UIColor.white.withAlphaComponent(0.0) diff --git a/Ring/Ring/Features/Me/Me/AccountHeader.swift b/Ring/Ring/Features/Me/Me/AccountHeader.swift index b9883a83148a0dc0906a9af5027a1feb77e1ee3f..7e0b963035dfd1c2e7ae9ce596fe614798358376 100644 --- a/Ring/Ring/Features/Me/Me/AccountHeader.swift +++ b/Ring/Ring/Features/Me/Me/AccountHeader.swift @@ -22,6 +22,12 @@ class AccountHeader: GSKStretchyHeaderView { @IBOutlet weak var profileImageView: UIImageView! @IBOutlet weak var profileName: UITextField! + @IBOutlet weak var background: UIView! + + override func willMove(toWindow newWindow: UIWindow?) { + super.willMove(toWindow: newWindow) + background.backgroundColor = UIColor.jamiBackgroundColor + } override func didChangeStretchFactor(_ stretchFactor: CGFloat) { var alpha = CGFloatTranslateRange(stretchFactor, 0.2, 0.7, 0, 1) diff --git a/Ring/Ring/Features/Me/Me/AccountHeader.xib b/Ring/Ring/Features/Me/Me/AccountHeader.xib index 885b6805684b40cb0c9248ac80ce2ccd474f8cca..14a4e42d83b32ce493eb2dd61be3e60dd5cd889d 100644 --- a/Ring/Ring/Features/Me/Me/AccountHeader.xib +++ b/Ring/Ring/Features/Me/Me/AccountHeader.xib @@ -11,14 +11,14 @@ <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="AccountHeader" customModule="Ring" customModuleProvider="target"> - <rect key="frame" x="0.0" y="0.0" width="375" height="210"/> + <rect key="frame" x="0.0" y="0.0" width="375" height="270"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CHp-YH-dZ5"> - <rect key="frame" x="0.0" y="0.0" width="375" height="210"/> + <rect key="frame" x="0.0" y="0.0" width="375" height="270"/> <subviews> <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="bD3-jT-xLr"> - <rect key="frame" x="137.5" y="40" width="100" height="100"/> + <rect key="frame" x="137.5" y="100" width="100" height="100"/> <color key="tintColor" red="0.24705882352941178" green="0.42745098039215684" blue="0.65490196078431373" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> <constraints> <constraint firstAttribute="height" constant="100" id="2mb-uU-dHb"/> @@ -32,7 +32,7 @@ </userDefinedRuntimeAttributes> </imageView> <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Name" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="oQJ-jT-wTv"> - <rect key="frame" x="20" y="150" width="335" height="34"/> + <rect key="frame" x="20" y="210" width="335" height="34"/> <fontDescription key="fontDescription" style="UICTFontTextStyleTitle1"/> <textInputTraits key="textInputTraits"/> <userDefinedRuntimeAttributes> @@ -42,7 +42,7 @@ </subviews> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <constraints> - <constraint firstItem="bD3-jT-xLr" firstAttribute="top" secondItem="CHp-YH-dZ5" secondAttribute="top" constant="40" id="HnG-Ht-Pfl"/> + <constraint firstItem="bD3-jT-xLr" firstAttribute="top" secondItem="CHp-YH-dZ5" secondAttribute="top" constant="100" id="HnG-Ht-Pfl"/> <constraint firstItem="oQJ-jT-wTv" firstAttribute="top" secondItem="bD3-jT-xLr" secondAttribute="bottom" constant="10" id="oKl-Yq-gZw"/> <constraint firstItem="bD3-jT-xLr" firstAttribute="centerX" secondItem="CHp-YH-dZ5" secondAttribute="centerX" id="pf4-Dp-CPJ"/> <constraint firstItem="oQJ-jT-wTv" firstAttribute="leading" secondItem="CHp-YH-dZ5" secondAttribute="leading" constant="20" id="txQ-DZ-CHU"/> @@ -61,10 +61,14 @@ <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="number" keyPath="maximumContentHeight"> - <real key="value" value="210"/> + <real key="value" value="270"/> + </userDefinedRuntimeAttribute> + <userDefinedRuntimeAttribute type="number" keyPath="minimumContentHeight"> + <real key="value" value="0.0"/> </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> <connections> + <outlet property="background" destination="CHp-YH-dZ5" id="9s3-V0-LLh"/> <outlet property="profileImageView" destination="bD3-jT-xLr" id="wNj-F7-4yD"/> <outlet property="profileName" destination="oQJ-jT-wTv" id="yaH-GU-Sih"/> </connections> diff --git a/Ring/Ring/Features/Me/Me/BlockListViewController.storyboard b/Ring/Ring/Features/Me/Me/BlockListViewController.storyboard index 13ac2d90649cb6942fa1420f38851a98a545c97c..99d548e634bdb38a4762b291328b6097be67df19 100644 --- a/Ring/Ring/Features/Me/Me/BlockListViewController.storyboard +++ b/Ring/Ring/Features/Me/Me/BlockListViewController.storyboard @@ -1,11 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="cWr-kq-EfK"> - <device id="retina4_7" orientation="portrait"> - <adaptation id="fullscreen"/> - </device> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="cWr-kq-EfK"> + <device id="retina4_7" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> @@ -13,24 +11,22 @@ <!--Block List View Controller--> <scene sceneID="CDw-GO-ni9"> <objects> - <viewController hidesBottomBarWhenPushed="YES" id="cWr-kq-EfK" customClass="BlockListViewController" customModule="Ring" customModuleProvider="target" sceneMemberID="viewController"> + <viewController extendedLayoutIncludesOpaqueBars="YES" hidesBottomBarWhenPushed="YES" id="cWr-kq-EfK" customClass="BlockListViewController" customModule="Ring" customModuleProvider="target" sceneMemberID="viewController"> <view key="view" contentMode="scaleToFill" id="YKN-B2-7X7"> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="72" estimatedRowHeight="72" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="eGc-th-VK5"> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> + <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> </tableView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="No blocked contacts" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nUo-eH-a0f"> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> </subviews> - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <constraints> <constraint firstItem="eGc-th-VK5" firstAttribute="top" secondItem="YKN-B2-7X7" secondAttribute="top" id="5Nj-Mt-QeY"/> <constraint firstItem="nUo-eH-a0f" firstAttribute="top" secondItem="YKN-B2-7X7" secondAttribute="top" id="6YC-L1-UO0"/> @@ -43,7 +39,6 @@ </constraints> <viewLayoutGuide key="safeArea" id="wN6-Fz-tau"/> </view> - <extendedEdge key="edgesForExtendedLayout"/> <connections> <outlet property="noBlockedContactLabel" destination="nUo-eH-a0f" id="0zv-9l-3GL"/> <outlet property="tableView" destination="eGc-th-VK5" id="4JY-jU-2Xb"/> diff --git a/Ring/Ring/Features/Me/Me/BlockListViewController.swift b/Ring/Ring/Features/Me/Me/BlockListViewController.swift index 351ef8f3ad7ff75968a13b36ec0b4c2c6b33f250..9bb42df77a49d002097b287a04d8e51b89469f79 100644 --- a/Ring/Ring/Features/Me/Me/BlockListViewController.swift +++ b/Ring/Ring/Features/Me/Me/BlockListViewController.swift @@ -32,12 +32,11 @@ class BlockListViewController: UIViewController, StoryboardBased, ViewModelBased @IBOutlet weak var tableView: UITableView! @IBOutlet weak var noBlockedContactLabel: UILabel! - override var preferredStatusBarStyle: UIStatusBarStyle { - return .default - } - override func viewDidLoad() { super.viewDidLoad() + tableView.backgroundColor = UIColor.jamiBackgroundColor + noBlockedContactLabel.backgroundColor = UIColor.jamiBackgroundColor + noBlockedContactLabel.textColor = UIColor.jamiLabelColor self.configureRingNavigationBar() self.navigationItem.title = L10n.AccountPage.blockedContacts diff --git a/Ring/Ring/Features/Me/Me/DeviceCell.xib b/Ring/Ring/Features/Me/Me/DeviceCell.xib index acbf73c0caa9762afb80490b127b91f6cbef8f1f..d7d4e61b6d01a00ec3262092c00c8934c2dcfc19 100644 --- a/Ring/Ring/Features/Me/Me/DeviceCell.xib +++ b/Ring/Ring/Features/Me/Me/DeviceCell.xib @@ -54,7 +54,7 @@ </constraints> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="number" keyPath="borderWidth"> - <real key="value" value="10"/> + <real key="value" value="0.0"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="color" keyPath="borderColor"> <color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> diff --git a/Ring/Ring/Features/Me/Me/MeViewController.storyboard b/Ring/Ring/Features/Me/Me/MeViewController.storyboard index 277025b76533e606a1607ecdc5d4322854b9813b..2722a4effd88eaf09228de98e4b985ef149551e5 100644 --- a/Ring/Ring/Features/Me/Me/MeViewController.storyboard +++ b/Ring/Ring/Features/Me/Me/MeViewController.storyboard @@ -1,18 +1,16 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="RuW-kz-iBP"> - <device id="retina4_7" orientation="portrait"> - <adaptation id="fullscreen"/> - </device> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="RuW-kz-iBP"> + <device id="retina4_7" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <scenes> <!--Me View Controller--> <scene sceneID="JC9-vU-UJ4"> <objects> - <viewController id="RuW-kz-iBP" customClass="MeViewController" customModule="Ring" customModuleProvider="target" sceneMemberID="viewController"> + <viewController automaticallyAdjustsScrollViewInsets="NO" id="RuW-kz-iBP" customClass="MeViewController" customModule="Ring" customModuleProvider="target" sceneMemberID="viewController"> <layoutGuides> <viewControllerLayoutGuide type="top" id="SYf-gf-IKh"/> <viewControllerLayoutGuide type="bottom" id="tam-QD-Xpf"/> @@ -21,7 +19,7 @@ <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> - <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" estimatedSectionHeaderHeight="40" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="eg8-N7-lDA" customClass="SettingsTableView" customModule="Ring" customModuleProvider="target"> + <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" contentInsetAdjustmentBehavior="never" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" estimatedSectionHeaderHeight="40" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="eg8-N7-lDA" customClass="SettingsTableView" customModule="Ring" customModuleProvider="target"> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> </tableView> @@ -34,7 +32,6 @@ <constraint firstAttribute="trailing" secondItem="eg8-N7-lDA" secondAttribute="trailing" id="tv6-ma-ze2"/> </constraints> </view> - <extendedEdge key="edgesForExtendedLayout" bottom="YES"/> <navigationItem key="navigationItem" id="vC8-Ti-TTd"/> <connections> <outlet property="settingsTable" destination="eg8-N7-lDA" id="gJV-8a-jA3"/> diff --git a/Ring/Ring/Features/Me/Me/MeViewController.swift b/Ring/Ring/Features/Me/Me/MeViewController.swift index 288edc3fe62f83036450f8a9c6036abf61db3fcb..fed5ae63f7d24cd4c7d48a239c06b7bcec4d3560 100644 --- a/Ring/Ring/Features/Me/Me/MeViewController.swift +++ b/Ring/Ring/Features/Me/Me/MeViewController.swift @@ -41,9 +41,6 @@ class MeViewController: EditProfileViewController, StoryboardBased, ViewModelBas var sipCredentialsMargin: CGFloat = 0 let sipCredentialsTAG: Int = 100 - override var preferredStatusBarStyle: UIStatusBarStyle { - return .default - } private let sipAccountCredentialsCell = "sipAccountCredentialsCell" private let jamiIDCell = "jamiIDCell" private let jamiUserNameCell = "jamiUserNameCell" @@ -51,18 +48,23 @@ class MeViewController: EditProfileViewController, StoryboardBased, ViewModelBas // MARK: - functions override func viewDidLoad() { + self.view.backgroundColor = UIColor.jamiBackgroundColor + self.settingsTable.backgroundColor = UIColor.jamiBackgroundColor self.addHeaderView() super.viewDidLoad() self.applyL10n() self.configureBindings() self.configureRingNavigationBar() self.calculateSipCredentialsMargin() - self.adaptTableToKeyboardState(for: self.settingsTable, with: self.disposeBag, + self.adaptTableToKeyboardState(for: self.settingsTable, + with: self.disposeBag, topOffset: self.stretchyHeader.minimumContentHeight) - NotificationCenter.default.addObserver(self, - selector: #selector(preferredContentSizeChanged(_:)), - name: UIContentSizeCategory.didChangeNotification, - object: nil) + NotificationCenter + .default + .addObserver(self, + selector: #selector(preferredContentSizeChanged(_:)), + name: UIContentSizeCategory.didChangeNotification, + object: nil) } @objc private func preferredContentSizeChanged(_ notification: NSNotification) { @@ -91,7 +93,10 @@ class MeViewController: EditProfileViewController, StoryboardBased, ViewModelBas supportEditProfile() return } + headerView.backgroundColor = UIColor.jamiBackgroundColor self.stretchyHeader = headerView + let point = CGPoint(x: 0, y: 100) + self.stretchyHeader.frame.origin = point self.settingsTable.addSubview(self.stretchyHeader) self.settingsTable.delegate = self self.profileImageView = stretchyHeader.profileImageView @@ -296,6 +301,7 @@ class MeViewController: EditProfileViewController, StoryboardBased, ViewModelBas case .device(let device): let cell = tableView.dequeueReusableCell(for: indexPath, cellType: DeviceCell.self) + cell.backgroundColor = UIColor.jamiBackgroundColor cell.deviceIdLabel.text = device.deviceId cell.deviceIdLabel.font = UIFont.preferredFont(forTextStyle: .caption1) cell.deviceIdLabel.sizeToFit() @@ -314,6 +320,7 @@ class MeViewController: EditProfileViewController, StoryboardBased, ViewModelBas case .linkNew: let cell = DisposableCell() + cell.backgroundColor = UIColor.jamiBackgroundColor cell.textLabel?.text = L10n.AccountPage.linkDeviceTitle cell.textLabel?.textColor = UIColor.jamiMain cell.textLabel?.textAlignment = .center @@ -336,6 +343,7 @@ class MeViewController: EditProfileViewController, StoryboardBased, ViewModelBas cell.selectionStyle = .none cell.sizeToFit() let button = UIButton.init(frame: cell.frame) + cell.backgroundColor = UIColor.jamiBackgroundColor let size = CGSize(width: self.view.frame.width, height: button.frame.height) button.frame.size = size cell.addSubview(button) @@ -347,12 +355,13 @@ class MeViewController: EditProfileViewController, StoryboardBased, ViewModelBas case .sectionHeader(let title): let cell = UITableViewCell() cell.textLabel?.text = title - cell.backgroundColor = UIColor.jamiNavigationBar + cell.backgroundColor = UIColor.jamiBackgroundSecondaryColor cell.selectionStyle = .none return cell case .removeAccount: let cell = DisposableCell() + cell.backgroundColor = UIColor.jamiBackgroundColor cell.textLabel?.text = L10n.AccountPage.removeAccountTitle cell.textLabel?.textColor = UIColor.jamiMain cell.textLabel?.textAlignment = .center @@ -392,11 +401,13 @@ class MeViewController: EditProfileViewController, StoryboardBased, ViewModelBas style: .footnote) case .ordinary(let label): let cell = UITableViewCell() + cell.backgroundColor = UIColor.jamiBackgroundColor cell.textLabel?.text = label cell.selectionStyle = .none return cell case .shareAccountDetails: let cell = DisposableCell() + cell.backgroundColor = UIColor.jamiBackgroundColor cell.textLabel?.text = L10n.AccountPage.shareAccountDetails cell.textLabel?.textColor = UIColor.jamiMain cell.textLabel?.textAlignment = .center @@ -413,6 +424,7 @@ class MeViewController: EditProfileViewController, StoryboardBased, ViewModelBas case .notifications: let cell = DisposableCell() + cell.backgroundColor = UIColor.jamiBackgroundColor cell.textLabel?.text = L10n.AccountPage.enableNotifications let switchView = UISwitch() cell.selectionStyle = .none @@ -458,6 +470,7 @@ class MeViewController: EditProfileViewController, StoryboardBased, ViewModelBas return cell case .accountState(let state): let cell = DisposableCell(style: .value1, reuseIdentifier: self.accountStateCell) + cell.backgroundColor = UIColor.jamiBackgroundColor cell.textLabel?.text = L10n.Account.accountStatus cell.selectionStyle = .none @@ -472,6 +485,7 @@ class MeViewController: EditProfileViewController, StoryboardBased, ViewModelBas return cell case .enableAccount: let cell = DisposableCell() + cell.backgroundColor = UIColor.jamiBackgroundColor cell.textLabel?.text = L10n.Account.enableAccount let switchView = UISwitch() cell.selectionStyle = .none @@ -546,6 +560,7 @@ class MeViewController: EditProfileViewController, StoryboardBased, ViewModelBas func configureSipCredentialsCell(cellType: SettingsSection.SectionRow, value: String) -> UITableViewCell { let cell = DisposableCell(style: .value1, reuseIdentifier: sipAccountCredentialsCell) + cell.backgroundColor = UIColor.jamiBackgroundColor cell.selectionStyle = .none let text = UITextField() text.tag = self.sipCredentialsTAG diff --git a/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.storyboard b/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.storyboard index d396af62c7f2ba9a9396db2e65751350515efc1b..9642d3064800b4647085ab8e08c672b2c97f457e 100644 --- a/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.storyboard +++ b/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.storyboard @@ -186,7 +186,9 @@ </constraints> <fontDescription key="fontDescription" type="system" weight="thin" pointSize="18"/> <color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/> - <state key="normal" title="Create account"/> + <state key="normal" title="Create account"> + <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + </state> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="boolean" keyPath="roundedCorners" value="YES"/> </userDefinedRuntimeAttributes> diff --git a/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.swift b/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.swift index 9630aff4831639d46462b352e9900b33c158330d..7128222a2a93a80b35fda53e53fb4d272b24b430 100644 --- a/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.swift +++ b/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewController.swift @@ -59,10 +59,6 @@ class CreateAccountViewController: UIViewController, StoryboardBased, ViewModelB var keyboardDismissTapRecognizer: UITapGestureRecognizer! var isKeyboardOpened: Bool = false - override var preferredStatusBarStyle: UIStatusBarStyle { - return .default - } - // MARK: functions override func viewDidLoad() { // L10n @@ -101,6 +97,7 @@ class CreateAccountViewController: UIViewController, StoryboardBased, ViewModelB self?.choosePasswordViewHeightConstraint.constant = 133 + height self?.view.layoutIfNeeded() }).disposed(by: self.disposeBag) + adaptToSystemColor() } override func viewWillAppear(_ animated: Bool) { @@ -109,6 +106,27 @@ class CreateAccountViewController: UIViewController, StoryboardBased, ViewModelB NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillDisappear(withNotification:)), name: UIResponder.keyboardWillHideNotification, object: nil) } + func adaptToSystemColor() { + view.backgroundColor = UIColor.jamiBackgroundColor + scrollView.backgroundColor = UIColor.jamiBackgroundColor + registerUsernameLabel.textColor = UIColor.jamiTextSecondary + recommendedLabel.textColor = UIColor.jamiTextSecondary + chooseAPasswordLabel.textColor = UIColor.jamiTextSecondary + enableNotificationsLabel.textColor = UIColor.jamiTextSecondary + passwordInfoLabel.textColor = UIColor.jamiTextBlue + registerPasswordView.backgroundColor = UIColor.jamiBackgroundColor + registerUsernameView.backgroundColor = UIColor.jamiBackgroundColor + usernameTextField.backgroundColor = UIColor.jamiBackgroundColor + passwordTextField.backgroundColor = UIColor.jamiBackgroundColor + confirmPasswordTextField.backgroundColor = UIColor.jamiBackgroundColor + usernameTextField.borderColor = UIColor.jamiTextBlue + passwordTextField.borderColor = UIColor.jamiTextBlue + confirmPasswordTextField.borderColor = UIColor.jamiTextBlue + usernameSwitch.tintColor = UIColor.jamiTextBlue + passwordSwitch.tintColor = UIColor.jamiTextBlue + notificationsSwitch.tintColor = UIColor.jamiTextBlue + } + func setContentInset() { if !self.isKeyboardOpened { self.containerViewBottomConstraint.constant = -20 diff --git a/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewModel.swift b/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewModel.swift index 84159781530b5736a171b9984d8a63afda81c4d5..41d3fb5430b68f672ee20fbf5675757d4e5787fa 100644 --- a/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewModel.swift +++ b/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewModel.swift @@ -254,7 +254,6 @@ class CreateAccountViewModel: Stateable, ViewModel { }() required init (with injectionBag: InjectionBag) { - // var isPageDisplayed = false self.accountService = injectionBag.accountService self.nameService = injectionBag.nameService diff --git a/Ring/Ring/Features/Walkthrough/CreateProfile/CreateProfileViewController.storyboard b/Ring/Ring/Features/Walkthrough/CreateProfile/CreateProfileViewController.storyboard index 2443ad7c52287a09ee571f0e303dc626c602e315..62ceb82e9c38179931b6e8ecfab6c94c4cb0292e 100644 --- a/Ring/Ring/Features/Walkthrough/CreateProfile/CreateProfileViewController.storyboard +++ b/Ring/Ring/Features/Walkthrough/CreateProfile/CreateProfileViewController.storyboard @@ -76,7 +76,6 @@ </constraints> </imageView> </subviews> - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> <constraint firstItem="Ebb-h3-1X3" firstAttribute="centerX" secondItem="0Yq-n7-91P" secondAttribute="centerX" id="3Do-Tm-CjF"/> <constraint firstItem="Wss-Rm-aKz" firstAttribute="centerY" secondItem="8lL-e0-PFL" secondAttribute="centerY" constant="95" id="8Qr-wz-HY8"/> @@ -165,6 +164,7 @@ <outlet property="arrow" destination="RuJ-k9-6d2" id="sfC-3H-hGp"/> <outlet property="arrowHeightConstraint" destination="RIv-ZQ-8Uw" id="wPN-ra-uLi"/> <outlet property="arrowYConstraint" destination="SXy-dy-AW4" id="tL4-Ml-YxQ"/> + <outlet property="backgroundView" destination="0Yq-n7-91P" id="sEk-A5-g23"/> <outlet property="createYourAvatarLabel" destination="dwE-6U-bqU" id="eNT-V7-RAm"/> <outlet property="enterNameLabel" destination="N1N-hn-LTy" id="4gq-l5-bHn"/> <outlet property="infoProfileImage" destination="z2z-6h-lsY" id="XkJ-uW-3b9"/> diff --git a/Ring/Ring/Features/Walkthrough/CreateProfile/CreateProfileViewController.swift b/Ring/Ring/Features/Walkthrough/CreateProfile/CreateProfileViewController.swift index bea499aa6ae8503a838ed686d4b2b3297267fb6d..c02b5d73925ccc31564fc121428606eac03dee84 100644 --- a/Ring/Ring/Features/Walkthrough/CreateProfile/CreateProfileViewController.swift +++ b/Ring/Ring/Features/Walkthrough/CreateProfile/CreateProfileViewController.swift @@ -38,6 +38,7 @@ class CreateProfileViewController: EditProfileViewController, StoryboardBased, V @IBOutlet weak var profileImageViewHeightConstraint: NSLayoutConstraint! @IBOutlet weak var scrollView: UIScrollView! @IBOutlet weak var infoProfileImage: UIImageView! + @IBOutlet weak var backgroundView: UIView! // MARK: members private let disposeBag = DisposeBag() @@ -46,10 +47,6 @@ class CreateProfileViewController: EditProfileViewController, StoryboardBased, V var keyboardDismissTapRecognizer: UITapGestureRecognizer! let tapGesture = UITapGestureRecognizer() - override var preferredStatusBarStyle: UIStatusBarStyle { - return .default - } - // MARK: functions override func viewDidLoad() { super.viewDidLoad() @@ -62,11 +59,11 @@ class CreateProfileViewController: EditProfileViewController, StoryboardBased, V self.profileImageView.layer.shadowOpacity = 0.5 self.profileImageView.layer.shadowOffset = CGSize.zero self.profileImageView.layer.shadowRadius = 4 - self.profileName.tintColor = UIColor.jamiSecondary self.infoProfileImage.layer.shadowColor = UIColor.gray.cgColor self.infoProfileImage.layer.shadowOpacity = 0.5 self.infoProfileImage.layer.shadowOffset = CGSize.zero self.infoProfileImage.layer.shadowRadius = 4 + adaptToSystemColor() // Animations DispatchQueue.global(qos: .background).async { @@ -133,6 +130,17 @@ class CreateProfileViewController: EditProfileViewController, StoryboardBased, V }).disposed(by: self.disposeBag) } + func adaptToSystemColor() { + view.backgroundColor = UIColor.jamiBackgroundColor + backgroundView.backgroundColor = UIColor.jamiBackgroundColor + self.profileName.tintColor = UIColor.jamiSecondary + scrollView.backgroundColor = UIColor.jamiBackgroundColor + subtitle.textColor = UIColor.jamiTextSecondary + enterNameLabel.textColor = UIColor.jamiTextSecondary + profileName.backgroundColor = UIColor.jamiBackgroundColor + profileName.borderColor = UIColor.jamiTextBlue + } + func dismissInfoView() { UIView.animate(withDuration: 0.3, animations: { [weak self] in self?.infoView.alpha = 0 diff --git a/Ring/Ring/Features/Walkthrough/CreateSipAccount/CreateSipAccountViewController.storyboard b/Ring/Ring/Features/Walkthrough/CreateSipAccount/CreateSipAccountViewController.storyboard index c9932670d2a80b9be168e62526b5310190249fbb..a8a0f6a83bbfa799049a757ed11a8f687171c5eb 100644 --- a/Ring/Ring/Features/Walkthrough/CreateSipAccount/CreateSipAccountViewController.storyboard +++ b/Ring/Ring/Features/Walkthrough/CreateSipAccount/CreateSipAccountViewController.storyboard @@ -233,6 +233,7 @@ <viewLayoutGuide key="safeArea" id="asY-zx-uYD"/> </view> <connections> + <outlet property="backgroundView" destination="daQ-3e-VKq" id="RtR-Mp-68e"/> <outlet property="createAccountButton" destination="31a-Gd-rzz" id="emU-Tv-WdU"/> <outlet property="passwordLabel" destination="h1h-xB-2Im" id="gNl-Yq-JdG"/> <outlet property="passwordTextField" destination="N2t-MA-mli" id="A0W-4E-Lmu"/> diff --git a/Ring/Ring/Features/Walkthrough/CreateSipAccount/CreateSipAccountViewController.swift b/Ring/Ring/Features/Walkthrough/CreateSipAccount/CreateSipAccountViewController.swift index cd84bfa0f148ad5f4f59d04fce1a967b530ae981..7cd30fb7c510ee19e997fba46a746ff50b8e9172 100644 --- a/Ring/Ring/Features/Walkthrough/CreateSipAccount/CreateSipAccountViewController.swift +++ b/Ring/Ring/Features/Walkthrough/CreateSipAccount/CreateSipAccountViewController.swift @@ -36,6 +36,7 @@ class CreateSipAccountViewController: UIViewController, StoryboardBased, ViewMod @IBOutlet weak var passwordLabel: UILabel! @IBOutlet weak var serverLabel: UILabel! @IBOutlet weak var portLabel: UILabel! + @IBOutlet weak var backgroundView: UIView! var keyboardDismissTapRecognizer: UITapGestureRecognizer! var isKeyboardOpened: Bool = false @@ -59,6 +60,7 @@ class CreateSipAccountViewController: UIViewController, StoryboardBased, ViewMod self?.createAccountButton.updateGradientFrame() self?.configureWalkrhroughNavigationBar() }).disposed(by: self.disposeBag) + adaptToSystemColor() } override func viewWillAppear(_ animated: Bool) { @@ -71,6 +73,24 @@ class CreateSipAccountViewController: UIViewController, StoryboardBased, ViewMod NotificationCenter.default.removeObserver(self, name: UIResponder.keyboardWillShowNotification, object: nil) } + func adaptToSystemColor() { + view.backgroundColor = UIColor.jamiBackgroundColor + backgroundView.backgroundColor = UIColor.jamiBackgroundColor + scrollView.backgroundColor = UIColor.jamiBackgroundColor + userNameLabel.textColor = UIColor.jamiTextSecondary + passwordLabel.textColor = UIColor.jamiTextSecondary + serverLabel.textColor = UIColor.jamiTextSecondary + portLabel.textColor = UIColor.jamiTextSecondary + userNameTextField.backgroundColor = UIColor.jamiBackgroundColor + passwordTextField.backgroundColor = UIColor.jamiBackgroundColor + serverTextField.backgroundColor = UIColor.jamiBackgroundColor + portTextField.backgroundColor = UIColor.jamiBackgroundColor + userNameTextField.borderColor = UIColor.jamiTextBlue + passwordTextField.borderColor = UIColor.jamiTextBlue + serverTextField.borderColor = UIColor.jamiTextBlue + portTextField.borderColor = UIColor.jamiTextBlue + } + @objc func dismissKeyboard() { self.isKeyboardOpened = false view.endEditing(true) diff --git a/Ring/Ring/Features/Walkthrough/LinkDevice/LinkDeviceViewController.swift b/Ring/Ring/Features/Walkthrough/LinkDevice/LinkDeviceViewController.swift index bfabeb1c13eee06b5e42a0ad850d1e346f1dbc10..a0da40827e1819455c04bc348a6b2fd37cb1ccc8 100644 --- a/Ring/Ring/Features/Walkthrough/LinkDevice/LinkDeviceViewController.swift +++ b/Ring/Ring/Features/Walkthrough/LinkDevice/LinkDeviceViewController.swift @@ -48,10 +48,6 @@ class LinkDeviceViewController: UIViewController, StoryboardBased, ViewModelBase let log = SwiftyBeaver.self - override var preferredStatusBarStyle: UIStatusBarStyle { - return .default - } - // MARK: functions override func viewDidLoad() { super.viewDidLoad() @@ -61,8 +57,10 @@ class LinkDeviceViewController: UIViewController, StoryboardBased, ViewModelBase self.configureWalkrhroughNavigationBar() self.view.layoutIfNeeded() self.linkButton.applyGradient(with: [UIColor.jamiButtonLight, UIColor.jamiButtonDark], gradient: .horizontal) + self.pinTextField.tintColor = UIColor.jamiSecondary self.passwordTextField.tintColor = UIColor.jamiSecondary + adaptToSystemColor() self.applyL10n() @@ -118,6 +116,20 @@ class LinkDeviceViewController: UIViewController, StoryboardBased, ViewModelBase }).disposed(by: self.disposeBag) } + func adaptToSystemColor() { + view.backgroundColor = UIColor.jamiBackgroundColor + scrollView.backgroundColor = UIColor.jamiBackgroundColor + pinLabel.textColor = UIColor.jamiTextSecondary + passwordLabel.textColor = UIColor.jamiTextSecondary + enableNotificationsLabel.textColor = UIColor.jamiTextSecondary + self.pinTextField.backgroundColor = UIColor.jamiBackgroundColor + self.passwordTextField.backgroundColor = UIColor.jamiBackgroundColor + self.pinTextField.borderColor = UIColor.jamiTextBlue + self.passwordTextField.borderColor = UIColor.jamiTextBlue + notificationsSwitch.tintColor = UIColor.jamiTextBlue + pinInfoButton.tintColor = UIColor.jamiTextBlue + } + func setContentInset() { if !self.isKeyboardOpened { self.containerViewBottomConstraint.constant = -20 diff --git a/Ring/Ring/Features/Walkthrough/LinkToAccountManager/LinkToAccountManagerViewController.storyboard b/Ring/Ring/Features/Walkthrough/LinkToAccountManager/LinkToAccountManagerViewController.storyboard index a9dbc2424f4e54e40d643653f5760135e5cd0392..ec6e8617889cd1afc62aa27e5b2c3c4cb190c7a2 100644 --- a/Ring/Ring/Features/Walkthrough/LinkToAccountManager/LinkToAccountManagerViewController.storyboard +++ b/Ring/Ring/Features/Walkthrough/LinkToAccountManager/LinkToAccountManagerViewController.storyboard @@ -175,7 +175,6 @@ </constraints> </stackView> </subviews> - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <constraints> <constraint firstAttribute="height" constant="800" id="BuH-dc-4uY"/> <constraint firstItem="cZa-pp-ILv" firstAttribute="centerX" secondItem="kQW-jH-EMh" secondAttribute="centerX" id="J9V-hd-HTu"/> diff --git a/Ring/Ring/Features/Walkthrough/LinkToAccountManager/LinkToAccountManagerViewController.swift b/Ring/Ring/Features/Walkthrough/LinkToAccountManager/LinkToAccountManagerViewController.swift index 385d9b42f4492bd86d123980318c91b4b3657115..a548d82bbe44c850fa1b1a79e6299636fe8a6435 100644 --- a/Ring/Ring/Features/Walkthrough/LinkToAccountManager/LinkToAccountManagerViewController.swift +++ b/Ring/Ring/Features/Walkthrough/LinkToAccountManager/LinkToAccountManagerViewController.swift @@ -56,6 +56,7 @@ var viewModel: LinkToAccountManagerViewModel! self?.signInButton.updateGradientFrame() self?.configureWalkrhroughNavigationBar() }).disposed(by: self.disposeBag) + adaptToSystemColor() } override func viewWillAppear(_ animated: Bool) { @@ -148,4 +149,20 @@ var viewModel: LinkToAccountManagerViewModel! accountManagerLabel.text = L10n.LinkToAccountManager.accountManagerLabel self.enableNotificationsLabel.text = L10n.CreateAccount.enableNotifications } + + func adaptToSystemColor() { + view.backgroundColor = UIColor.jamiBackgroundColor + scrollView.backgroundColor = UIColor.jamiBackgroundColor + userNameLabel.textColor = UIColor.jamiTextSecondary + passwordLabel.textColor = UIColor.jamiTextSecondary + accountManagerLabel.textColor = UIColor.jamiTextSecondary + enableNotificationsLabel.textColor = UIColor.jamiTextSecondary + userNameTextField.backgroundColor = UIColor.jamiBackgroundColor + passwordTextField.backgroundColor = UIColor.jamiBackgroundColor + accountManagerTextField.backgroundColor = UIColor.jamiBackgroundColor + userNameTextField.borderColor = UIColor.jamiTextBlue + passwordTextField.borderColor = UIColor.jamiTextBlue + accountManagerTextField.borderColor = UIColor.jamiTextBlue + notificationsSwitch.tintColor = UIColor.jamiTextBlue + } } diff --git a/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewController.swift b/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewController.swift index 2316c5addaf40cc6b66f8eaa85af350a75bc9ec6..fe0badf60d444324c24cdf0210a2c0f2468fd8ad 100644 --- a/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewController.swift +++ b/Ring/Ring/Features/Walkthrough/Welcome/WelcomeViewController.swift @@ -41,10 +41,6 @@ class WelcomeViewController: UIViewController, StoryboardBased, ViewModelBased { // MARK: members private let disposeBag = DisposeBag() - override var preferredStatusBarStyle: UIStatusBarStyle { - return .default - } - // MARK: functions override func viewDidLoad() { super.viewDidLoad() @@ -100,6 +96,9 @@ class WelcomeViewController: UIViewController, StoryboardBased, ViewModelBased { self.connectToAccountManagerButton.rx.tap.subscribe(onNext: { [unowned self] in self.viewModel.linkToAccountManager() }).disposed(by: self.disposeBag) + view.backgroundColor = UIColor.jamiBackgroundColor + self.welcomeTextLabel.textColor = UIColor.jamiLabelColor + self.createSipAccountButton.setTitleColor(UIColor.jamiTextBlue, for: .normal) } func applyL10n() { diff --git a/Ring/Ring/GeneralSettings/GeneralSettingsViewController.storyboard b/Ring/Ring/GeneralSettings/GeneralSettingsViewController.storyboard index db093a3feeb72c2181552fbbbc6cb508e9a977a4..ef647c07e2cc62bf1857ba0c518ff808eae63be2 100644 --- a/Ring/Ring/GeneralSettings/GeneralSettingsViewController.storyboard +++ b/Ring/Ring/GeneralSettings/GeneralSettingsViewController.storyboard @@ -1,11 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<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="0KF-lS-cXQ"> - <device id="retina4_7" orientation="portrait"> - <adaptation id="fullscreen"/> - </device> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="0KF-lS-cXQ"> + <device id="retina4_7" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> @@ -13,7 +11,7 @@ <!--General Settings View Controller--> <scene sceneID="35j-2a-aAz"> <objects> - <viewController hidesBottomBarWhenPushed="YES" id="0KF-lS-cXQ" customClass="GeneralSettingsViewController" customModule="Ring" customModuleProvider="target" sceneMemberID="viewController"> + <viewController extendedLayoutIncludesOpaqueBars="YES" hidesBottomBarWhenPushed="YES" id="0KF-lS-cXQ" customClass="GeneralSettingsViewController" customModule="Ring" customModuleProvider="target" sceneMemberID="viewController"> <view key="view" contentMode="scaleToFill" id="tdP-kF-vrw"> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> @@ -62,7 +60,7 @@ </constraints> <viewLayoutGuide key="safeArea" id="f8H-BQ-kNd"/> </view> - <extendedEdge key="edgesForExtendedLayout"/> + <extendedEdge key="edgesForExtendedLayout" bottom="YES"/> <connections> <outlet property="doneButton" destination="NE7-nL-DvW" id="a2F-oe-Fon"/> <outlet property="settingsTable" destination="XAa-ES-xki" id="Af8-lt-Nsn"/> diff --git a/Ring/Ring/GeneralSettings/GeneralSettingsViewController.swift b/Ring/Ring/GeneralSettings/GeneralSettingsViewController.swift index 4fe7e9d77f87810527bb638319e4552c57c5a0fc..ce0e5b2c29340e9fdbc42b8c099fc5ba65f23b23 100644 --- a/Ring/Ring/GeneralSettings/GeneralSettingsViewController.swift +++ b/Ring/Ring/GeneralSettings/GeneralSettingsViewController.swift @@ -35,6 +35,8 @@ class GeneralSettingsViewController: UIViewController, StoryboardBased, ViewMode override func viewDidLoad() { super.viewDidLoad() + view.backgroundColor = UIColor.jamiBackgroundColor + settingsTable.backgroundColor = UIColor.jamiBackgroundColor self.applyL10n() self.setUpTable() doneButton.rx.tap @@ -88,7 +90,7 @@ class GeneralSettingsViewController: UIViewController, StoryboardBased, ViewMode case .sectionHeader(let title): let cell = UITableViewCell() cell.textLabel?.text = title - cell.backgroundColor = UIColor.jamiNavigationBar + cell.backgroundColor = UIColor.jamiBackgroundSecondaryColor cell.selectionStyle = .none cell.heightAnchor.constraint(equalToConstant: 35).isActive = true return cell diff --git a/Ring/Ring/Info.plist b/Ring/Ring/Info.plist index addb80c12c5319fbc57d9a3e6391046d59aca16e..6c6e947dc7223428460328fcb278e0d2d6a5b81c 100644 --- a/Ring/Ring/Info.plist +++ b/Ring/Ring/Info.plist @@ -70,7 +70,7 @@ <key>UIRequiresPersistentWiFi</key> <true/> <key>UIStatusBarStyle</key> - <string>UIStatusBarStyleDarkContent</string> + <string>UIStatusBarStyleDefault</string> <key>UIStatusBarTintParameters</key> <dict> <key>UINavigationBar</key> diff --git a/Ring/Ring/MigrateAccount/MigrateAccountViewController.swift b/Ring/Ring/MigrateAccount/MigrateAccountViewController.swift index c628668e77e4a22cd130a606712976b4328ad646..3168ac6e141ba0441662e701e5d8731ddf1c41c7 100644 --- a/Ring/Ring/MigrateAccount/MigrateAccountViewController.swift +++ b/Ring/Ring/MigrateAccount/MigrateAccountViewController.swift @@ -46,10 +46,6 @@ class MigrateAccountViewController: UIViewController, StoryboardBased, ViewModel var keyboardDismissTapRecognizer: UITapGestureRecognizer! var isKeyboardOpened: Bool = false - override var preferredStatusBarStyle: UIStatusBarStyle { - return .default - } - override func viewDidLoad() { super.viewDidLoad() self.view.layoutIfNeeded() @@ -72,6 +68,12 @@ class MigrateAccountViewController: UIViewController, StoryboardBased, ViewModel self?.cancelButton.updateGradientFrame() self?.migrateOtherAccountButton.updateGradientFrame() }).disposed(by: self.disposeBag) + explanationLabel.textColor = UIColor.jamiLabelColor + titleLabel.textColor = UIColor.jamiTextSecondary + passwordExplanationLabel.textColor = UIColor.jamiLabelColor + registeredNameLabel.textColor = UIColor.jamiLabelColor + jamiIdLabel.textColor = UIColor.jamiTextSecondary + displayNameLabel.textColor = UIColor.jamiLabelColor } override func viewWillAppear(_ animated: Bool) { diff --git a/Ring/Ring/QRCode/ScanViewController.swift b/Ring/Ring/QRCode/ScanViewController.swift index 006da5caf12552d26cd1cd94894aa979913ba17c..73caa01c2aba114a97e636e4d58033d1de5022c9 100644 --- a/Ring/Ring/QRCode/ScanViewController.swift +++ b/Ring/Ring/QRCode/ScanViewController.swift @@ -52,10 +52,6 @@ class ScanViewController: UIViewController, StoryboardBased, AVCaptureMetadataOu return cFrame }() - override var preferredStatusBarStyle: UIStatusBarStyle { - return .lightContent - } - // MARK: functions override func viewDidDisappear(_ animated: Bool) { super.viewDidDisappear(animated) diff --git a/Ring/Ring/Resources/Images.xcassets/background_input_text.colorset/Contents.json b/Ring/Ring/Resources/Images.xcassets/background_input_text.colorset/Contents.json new file mode 100644 index 0000000000000000000000000000000000000000..cca9b5e348fe1fde3278da22dd54ac5a3e1ddada --- /dev/null +++ b/Ring/Ring/Resources/Images.xcassets/background_input_text.colorset/Contents.json @@ -0,0 +1,56 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + }, + "colors" : [ + { + "idiom" : "universal", + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "255", + "alpha" : "0.570", + "blue" : "255", + "green" : "255" + } + } + }, + { + "idiom" : "universal", + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "light" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "255", + "alpha" : "0.570", + "blue" : "255", + "green" : "255" + } + } + }, + { + "idiom" : "universal", + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "1", + "alpha" : "0.570", + "blue" : "1", + "green" : "1" + } + } + } + ] +} \ No newline at end of file diff --git a/Ring/Ring/Resources/Images.xcassets/background_msg_received.colorset/Contents.json b/Ring/Ring/Resources/Images.xcassets/background_msg_received.colorset/Contents.json new file mode 100644 index 0000000000000000000000000000000000000000..180bf589b379114c728d312e5b12b6dbd60a4d61 --- /dev/null +++ b/Ring/Ring/Resources/Images.xcassets/background_msg_received.colorset/Contents.json @@ -0,0 +1,56 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + }, + "colors" : [ + { + "idiom" : "universal", + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "231", + "alpha" : "1.000", + "blue" : "235", + "green" : "235" + } + } + }, + { + "idiom" : "universal", + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "light" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "231", + "alpha" : "1.000", + "blue" : "235", + "green" : "235" + } + } + }, + { + "idiom" : "universal", + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "25", + "alpha" : "1.000", + "blue" : "30", + "green" : "30" + } + } + } + ] +} \ No newline at end of file diff --git a/Ring/Ring/Resources/Images.xcassets/background_ring.imageset/Contents.json b/Ring/Ring/Resources/Images.xcassets/background_ring.imageset/Contents.json deleted file mode 100644 index 8266831dc5ca733668136647c9f0153c4f163c98..0000000000000000000000000000000000000000 --- a/Ring/Ring/Resources/Images.xcassets/background_ring.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "background_ring.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Ring/Ring/Resources/Images.xcassets/background_ring.imageset/background_ring.png b/Ring/Ring/Resources/Images.xcassets/background_ring.imageset/background_ring.png deleted file mode 100644 index afc68a862412635aeef5c4bd48ec243b406fadf2..0000000000000000000000000000000000000000 Binary files a/Ring/Ring/Resources/Images.xcassets/background_ring.imageset/background_ring.png and /dev/null differ diff --git a/Ring/Ring/Resources/Images.xcassets/message_background_color.colorset/Contents.json b/Ring/Ring/Resources/Images.xcassets/message_background_color.colorset/Contents.json new file mode 100644 index 0000000000000000000000000000000000000000..8debdf0eeaab685c7a47fd1ad1f65f11ae9af340 --- /dev/null +++ b/Ring/Ring/Resources/Images.xcassets/message_background_color.colorset/Contents.json @@ -0,0 +1,56 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + }, + "colors" : [ + { + "idiom" : "universal", + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "252", + "alpha" : "1.000", + "blue" : "252", + "green" : "252" + } + } + }, + { + "idiom" : "universal", + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "light" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "252", + "alpha" : "1.000", + "blue" : "252", + "green" : "252" + } + } + }, + { + "idiom" : "universal", + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "10", + "alpha" : "1.000", + "blue" : "10", + "green" : "10" + } + } + } + ] +} \ No newline at end of file diff --git a/Ring/Ring/Resources/Images.xcassets/row_selected.colorset/Contents.json b/Ring/Ring/Resources/Images.xcassets/row_selected.colorset/Contents.json new file mode 100644 index 0000000000000000000000000000000000000000..7fd80d0dca485315a907a54ad196e1d40855e09d --- /dev/null +++ b/Ring/Ring/Resources/Images.xcassets/row_selected.colorset/Contents.json @@ -0,0 +1,56 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + }, + "colors" : [ + { + "idiom" : "universal", + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "209", + "alpha" : "1.000", + "blue" : "210", + "green" : "210" + } + } + }, + { + "idiom" : "universal", + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "light" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "209", + "alpha" : "1.000", + "blue" : "210", + "green" : "210" + } + } + }, + { + "idiom" : "universal", + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "30", + "alpha" : "0.946", + "blue" : "30", + "green" : "30" + } + } + } + ] +} \ No newline at end of file diff --git a/Ring/Ring/Resources/Images.xcassets/shadow_color.colorset/Contents.json b/Ring/Ring/Resources/Images.xcassets/shadow_color.colorset/Contents.json new file mode 100644 index 0000000000000000000000000000000000000000..e527cd9c41f7880c8c46a28f593af87abee7c322 --- /dev/null +++ b/Ring/Ring/Resources/Images.xcassets/shadow_color.colorset/Contents.json @@ -0,0 +1,56 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + }, + "colors" : [ + { + "idiom" : "universal", + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "0", + "alpha" : "1.000", + "blue" : "0", + "green" : "0" + } + } + }, + { + "idiom" : "universal", + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "light" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "0", + "alpha" : "1.000", + "blue" : "0", + "green" : "0" + } + } + }, + { + "idiom" : "universal", + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "180", + "alpha" : "1.000", + "blue" : "180", + "green" : "180" + } + } + } + ] +} \ No newline at end of file diff --git a/Ring/Ring/Resources/Images.xcassets/text_blue_color.colorset/Contents.json b/Ring/Ring/Resources/Images.xcassets/text_blue_color.colorset/Contents.json new file mode 100644 index 0000000000000000000000000000000000000000..dbac9a07d156f12f1588df18865b6b36b401e99b --- /dev/null +++ b/Ring/Ring/Resources/Images.xcassets/text_blue_color.colorset/Contents.json @@ -0,0 +1,56 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + }, + "colors" : [ + { + "idiom" : "universal", + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "31", + "alpha" : "1.000", + "blue" : "113", + "green" : "73" + } + } + }, + { + "idiom" : "universal", + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "light" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "31", + "alpha" : "1.000", + "blue" : "113", + "green" : "73" + } + } + }, + { + "idiom" : "universal", + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "91", + "alpha" : "1.000", + "blue" : "183", + "green" : "131" + } + } + } + ] +} \ No newline at end of file diff --git a/Ring/Ring/Resources/Images.xcassets/text_field_background_color.colorset/Contents.json b/Ring/Ring/Resources/Images.xcassets/text_field_background_color.colorset/Contents.json new file mode 100644 index 0000000000000000000000000000000000000000..f69d92207064c98b5a481586b808ea74098112c8 --- /dev/null +++ b/Ring/Ring/Resources/Images.xcassets/text_field_background_color.colorset/Contents.json @@ -0,0 +1,56 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + }, + "colors" : [ + { + "idiom" : "universal", + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "252", + "alpha" : "0.000", + "blue" : "252", + "green" : "252" + } + } + }, + { + "idiom" : "universal", + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "light" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "252", + "alpha" : "0.000", + "blue" : "252", + "green" : "252" + } + } + }, + { + "idiom" : "universal", + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "10", + "alpha" : "0.000", + "blue" : "10", + "green" : "10" + } + } + } + ] +} \ No newline at end of file diff --git a/Ring/Ring/Resources/Images.xcassets/text_secondary_color.colorset/Contents.json b/Ring/Ring/Resources/Images.xcassets/text_secondary_color.colorset/Contents.json new file mode 100644 index 0000000000000000000000000000000000000000..94476a17a57279d57d3c2cac17d6924c0d33e587 --- /dev/null +++ b/Ring/Ring/Resources/Images.xcassets/text_secondary_color.colorset/Contents.json @@ -0,0 +1,56 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + }, + "colors" : [ + { + "idiom" : "universal", + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "0", + "alpha" : "0.500", + "blue" : "0", + "green" : "0" + } + } + }, + { + "idiom" : "universal", + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "light" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "0", + "alpha" : "0.500", + "blue" : "0", + "green" : "0" + } + } + }, + { + "idiom" : "universal", + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "255", + "alpha" : "0.900", + "blue" : "255", + "green" : "255" + } + } + } + ] +} \ No newline at end of file diff --git a/Ring/Ring/Resources/LaunchScreen.storyboard b/Ring/Ring/Resources/LaunchScreen.storyboard index c98c791da7f5254a456b1da8d4e9239a49ba6fde..d9c602f98b4aa26c665aacf7b3380c9d25e94ade 100644 --- a/Ring/Ring/Resources/LaunchScreen.storyboard +++ b/Ring/Ring/Resources/LaunchScreen.storyboard @@ -1,11 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> - <device id="retina5_9" orientation="portrait"> - <adaptation id="fullscreen"/> - </device> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> + <device id="retina5_9" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <scenes> @@ -30,7 +28,7 @@ </constraints> </imageView> </subviews> - <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <constraints> <constraint firstItem="kP1-oe-ZEx" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="ksh-ub-gUe"/> <constraint firstItem="kP1-oe-ZEx" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="soi-Xo-HWk"/> @@ -43,6 +41,6 @@ </scene> </scenes> <resources> - <image name="jamiIcon" width="200" height="190"/> + <image name="jamiIcon" width="66.666664123535156" height="63.333332061767578"/> </resources> </document> diff --git a/Ring/Ring/TabBar/BaseViewController.swift b/Ring/Ring/TabBar/BaseViewController.swift index 4a59661a2cb1b909efdcac2c31ea2f233bfa089e..c9ef44bb1e4111308c8d74eb328a36258920aad0 100644 --- a/Ring/Ring/TabBar/BaseViewController.swift +++ b/Ring/Ring/TabBar/BaseViewController.swift @@ -54,8 +54,8 @@ class BaseViewController: UINavigationController { } convenience init(with type: TabBarItemType) { self.init() - self.navigationBar.isTranslucent = false + self.navigationBar.isTranslucent = true self.tabBarItem = type.tabBarItem - self.view.backgroundColor = UIColor.white + self.view.backgroundColor = UIColor.jamiBackgroundColor } }