Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/ios.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Weidmann <philippe.weidmann@infomaniak.com>2019-11-15 15:22:26 +0300
committerJoris Bodin <joris.bodin@infomaniak.com>2019-11-15 17:40:09 +0300
commit37f68d8604ca7ea23f7ab6a033625433fbb77a18 (patch)
treee32357420992fb7de99c74e25cd84ca1841ce9d1
parent1ad9c80bd18b1f8876d8deb82037a2488ef8c7ec (diff)
Small UI fix #9912.24.4-(1)
Signed-off-by: Philippe Weidmann <philippe.weidmann@infomaniak.com>
-rw-r--r--iOSClient/Main/CCMain.m2
-rw-r--r--iOSClient/Media/NCMedia.storyboard50
-rw-r--r--iOSClient/Media/NCMedia.swift17
-rw-r--r--iOSClient/Settings/CCManageAutoUpload.m4
4 files changed, 13 insertions, 60 deletions
diff --git a/iOSClient/Main/CCMain.m b/iOSClient/Main/CCMain.m
index 02ea8a30c..d142fe684 100644
--- a/iOSClient/Main/CCMain.m
+++ b/iOSClient/Main/CCMain.m
@@ -1711,7 +1711,7 @@
[alertController addTextFieldWithConfigurationHandler:^(UITextField *textField) {
[textField addTarget:self action:@selector(minCharTextFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
- textField.autocapitalizationType = UITextAutocapitalizationTypeWords;
+ textField.autocapitalizationType = UITextAutocapitalizationTypeSentences;
}];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"_cancel_",nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
diff --git a/iOSClient/Media/NCMedia.storyboard b/iOSClient/Media/NCMedia.storyboard
index 3eea404f6..9ea27b1d6 100644
--- a/iOSClient/Media/NCMedia.storyboard
+++ b/iOSClient/Media/NCMedia.storyboard
@@ -1,11 +1,11 @@
<?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="EFX-fO-Oip">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="EFX-fO-Oip">
<device id="retina5_9" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@@ -19,7 +19,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="Zaz-Cl-qpZ" customClass="FastScrollCollectionView" customModule="FastScroll">
- <rect key="frame" x="0.0" y="84" width="375" height="694"/>
+ <rect key="frame" x="0.0" y="44" width="375" height="734"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="0.0" minimumInteritemSpacing="0.0" id="fF1-wd-0xN">
<size key="itemSize" width="0.0" height="0.0"/>
@@ -33,56 +33,18 @@
<outlet property="delegate" destination="EFX-fO-Oip" id="s3n-CL-8X2"/>
</connections>
</collectionView>
- <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="G50-oX-FLW" userLabel="menuView">
- <rect key="frame" x="0.0" y="44" width="375" height="40"/>
- <constraints>
- <constraint firstAttribute="height" constant="40" id="BWR-lv-VfM"/>
- </constraints>
- </view>
- <button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1LR-q9-gsg" userLabel="menuButtonMore">
- <rect key="frame" x="338" y="51.666666666666657" width="25" height="25"/>
- <constraints>
- <constraint firstAttribute="width" constant="25" id="or7-4c-KqJ"/>
- <constraint firstAttribute="height" constant="25" id="pn1-Jb-zyy"/>
- </constraints>
- <state key="normal" image="moreBig"/>
- <connections>
- <action selector="touchUpInsideMenuButtonMore:" destination="EFX-fO-Oip" eventType="touchUpInside" id="Bma-8w-2u5"/>
- </connections>
- </button>
- <button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="OQ1-lf-7It" userLabel="menuButtonSwitch">
- <rect key="frame" x="12" y="51.666666666666657" width="25" height="25"/>
- <constraints>
- <constraint firstAttribute="height" constant="25" id="ekW-sZ-OU6"/>
- <constraint firstAttribute="width" constant="25" id="rTQ-C2-KxE"/>
- </constraints>
- <state key="normal" image="switchGridChange"/>
- <connections>
- <action selector="touchUpInsideMenuButtonSwitch:" destination="EFX-fO-Oip" eventType="touchUpInside" id="yZN-9G-Cj2"/>
- </connections>
- </button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
- <constraint firstItem="1LR-q9-gsg" firstAttribute="centerY" secondItem="G50-oX-FLW" secondAttribute="centerY" id="1IG-0W-2Km"/>
<constraint firstItem="Zaz-Cl-qpZ" firstAttribute="leading" secondItem="Meh-VD-wWh" secondAttribute="leading" id="1bp-sm-u0X"/>
- <constraint firstItem="G50-oX-FLW" firstAttribute="top" secondItem="Meh-VD-wWh" secondAttribute="top" id="3ed-pX-rRh"/>
- <constraint firstItem="OQ1-lf-7It" firstAttribute="centerY" secondItem="G50-oX-FLW" secondAttribute="centerY" id="SQq-P5-U5X"/>
- <constraint firstItem="Meh-VD-wWh" firstAttribute="trailing" secondItem="G50-oX-FLW" secondAttribute="trailing" id="Tfa-a7-aJb"/>
<constraint firstItem="Meh-VD-wWh" firstAttribute="trailing" secondItem="Zaz-Cl-qpZ" secondAttribute="trailing" id="aNd-UL-hmu"/>
<constraint firstItem="Meh-VD-wWh" firstAttribute="bottom" secondItem="Zaz-Cl-qpZ" secondAttribute="bottom" id="aNr-tf-2AH"/>
- <constraint firstItem="1LR-q9-gsg" firstAttribute="trailing" secondItem="G50-oX-FLW" secondAttribute="trailing" constant="-12" id="hRt-cK-gXl"/>
- <constraint firstItem="G50-oX-FLW" firstAttribute="leading" secondItem="Meh-VD-wWh" secondAttribute="leading" id="mg3-LM-XZM"/>
- <constraint firstItem="Zaz-Cl-qpZ" firstAttribute="top" secondItem="G50-oX-FLW" secondAttribute="bottom" id="xKg-EU-lKl"/>
- <constraint firstItem="OQ1-lf-7It" firstAttribute="leading" secondItem="G50-oX-FLW" secondAttribute="leading" constant="12" id="yys-ji-8dV"/>
+ <constraint firstItem="Zaz-Cl-qpZ" firstAttribute="top" secondItem="Meh-VD-wWh" secondAttribute="top" id="nIB-3t-o2I"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Meh-VD-wWh"/>
</view>
<connections>
<outlet property="collectionView" destination="Zaz-Cl-qpZ" id="8oA-Gx-z7T"/>
- <outlet property="menuButtonMore" destination="1LR-q9-gsg" id="6Yc-bd-p3W"/>
- <outlet property="menuButtonSwitch" destination="OQ1-lf-7It" id="G1t-eK-QCB"/>
- <outlet property="menuView" destination="G50-oX-FLW" id="9Rs-ip-Ybj"/>
<segue destination="rIl-hI-jAh" kind="showDetail" identifier="segueDetail" id="MHI-ti-PGq"/>
</connections>
</viewController>
@@ -99,8 +61,4 @@
<point key="canvasLocation" x="1080" y="228"/>
</scene>
</scenes>
- <resources>
- <image name="moreBig" width="120" height="120"/>
- <image name="switchGridChange" width="25" height="25"/>
- </resources>
</document>
diff --git a/iOSClient/Media/NCMedia.swift b/iOSClient/Media/NCMedia.swift
index bef4df699..3ea67fdb2 100644
--- a/iOSClient/Media/NCMedia.swift
+++ b/iOSClient/Media/NCMedia.swift
@@ -28,9 +28,6 @@ import FastScroll
class NCMedia: UIViewController, DropdownMenuDelegate, DZNEmptyDataSetSource, DZNEmptyDataSetDelegate, NCSelectDelegate {
@IBOutlet weak var collectionView : FastScrollCollectionView!
- @IBOutlet weak var menuButtonMore: UIButton!
- @IBOutlet weak var menuButtonSwitch: UIButton!
- @IBOutlet weak var menuView: UIView!
private let appDelegate = UIApplication.shared.delegate as! AppDelegate
@@ -70,6 +67,9 @@ class NCMedia: UIViewController, DropdownMenuDelegate, DZNEmptyDataSetSource, DZ
override func viewDidLoad() {
super.viewDidLoad()
+ self.navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(named: "more"), style: .plain, target: self, action: #selector(touchUpInsideMenuButtonMore))
+ self.navigationItem.leftBarButtonItem = UIBarButtonItem(image: UIImage(named: "switchGridChange"), style: .plain, target: self, action: #selector(touchUpInsideMenuButtonSwitch))
+
// Cell
collectionView.register(UINib.init(nibName: "NCGridMediaCell", bundle: nil), forCellWithReuseIdentifier: "gridCell")
@@ -112,12 +112,6 @@ class NCMedia: UIViewController, DropdownMenuDelegate, DZNEmptyDataSetSource, DZ
refreshControl.backgroundColor = NCBrandColor.sharedInstance.brand
refreshControl.addTarget(self, action: #selector(loadNetworkDatasource), for: .valueChanged)
- menuView.backgroundColor = NCBrandColor.sharedInstance.brand
- menuButtonSwitch.setImage(UIImage(named: "switchGridChange")?.withRenderingMode(.alwaysTemplate), for: .normal)
- menuButtonSwitch.tintColor = NCBrandColor.sharedInstance.brandText
- menuButtonMore.setImage(UIImage(named: "moreBig")?.withRenderingMode(.alwaysTemplate), for: .normal)
- menuButtonMore.tintColor = NCBrandColor.sharedInstance.brandText
-
// get auto upload folder
autoUploadFileName = NCManageDatabase.sharedInstance.getAccountAutoUploadFileName()
autoUploadDirectory = NCManageDatabase.sharedInstance.getAccountAutoUploadDirectory(appDelegate.activeUrl)
@@ -183,7 +177,7 @@ class NCMedia: UIViewController, DropdownMenuDelegate, DZNEmptyDataSetSource, DZ
// MARK: IBAction
- @IBAction func touchUpInsideMenuButtonSwitch(_ sender: Any) {
+ @objc func touchUpInsideMenuButtonSwitch(_ sender: Any) {
let itemSizeStart = self.gridLayout.itemSize
@@ -210,7 +204,7 @@ class NCMedia: UIViewController, DropdownMenuDelegate, DZNEmptyDataSetSource, DZ
})
}
- @IBAction func touchUpInsideMenuButtonMore(_ sender: Any) {
+ @objc func touchUpInsideMenuButtonMore(_ sender: Any) {
var menu: DropdownMenu?
@@ -247,7 +241,6 @@ class NCMedia: UIViewController, DropdownMenuDelegate, DZNEmptyDataSetSource, DZ
menu?.highlightColor = NCBrandColor.sharedInstance.brand
menu?.tableView.alwaysBounceVertical = false
menu?.tableViewSeperatorColor = NCBrandColor.sharedInstance.separator
- menu?.topOffsetY = menuView.bounds.height
menu?.tableViewBackgroundColor = NCBrandColor.sharedInstance.backgroundForm
menu?.cellBackgroundColor = NCBrandColor.sharedInstance.backgroundForm
menu?.textColor = NCBrandColor.sharedInstance.textView
diff --git a/iOSClient/Settings/CCManageAutoUpload.m b/iOSClient/Settings/CCManageAutoUpload.m
index fc8b60c23..7eeb9ca43 100644
--- a/iOSClient/Settings/CCManageAutoUpload.m
+++ b/iOSClient/Settings/CCManageAutoUpload.m
@@ -486,7 +486,9 @@
viewController.layoutViewSelect = k_layout_view_move;
[navigationController setModalPresentationStyle:UIModalPresentationFullScreen];
- [self presentViewController:navigationController animated:YES completion:nil];
+ [self presentViewController:navigationController animated:YES completion:^{
+ [self.tableView reloadData];
+ }];
}
@end