Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion iOSClient/Main/CCMain+Swift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Foundation
extension CCMain {

@objc func updateNavBarShadow(_ scrollView: UIScrollView, force: Bool) {
if (scrollView.contentOffset.y > -self.viewRichWorkspace.topView.frame.size.height || self.searchController.isActive || force) {
if (scrollView.contentOffset.y > self.viewRichWorkspace.topView.frame.size.height || self.searchController.isActive || force) {
if #available(iOS 13.0, *) {
let navBarAppearance = UINavigationBarAppearance()
navBarAppearance.configureWithOpaqueBackground()
Expand Down
3 changes: 2 additions & 1 deletion iOSClient/Main/CCMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@
@class tableMetadata;
@class NCViewRichWorkspace;

@interface CCMain : UITableViewController <UIActionSheetDelegate, UIGestureRecognizerDelegate, UIViewControllerPreviewingDelegate, UISplitViewControllerDelegate, UIPopoverControllerDelegate, UIDocumentMenuDelegate, UIDocumentPickerDelegate, UISearchResultsUpdating, UISearchControllerDelegate, UISearchBarDelegate, UIScrollViewDelegate, DZNEmptyDataSetSource, DZNEmptyDataSetDelegate>
@interface CCMain : UIViewController <UITableViewDataSource, UITableViewDelegate, UIActionSheetDelegate, UIGestureRecognizerDelegate, UIViewControllerPreviewingDelegate, UISplitViewControllerDelegate, UIPopoverControllerDelegate, UIDocumentMenuDelegate, UIDocumentPickerDelegate, UISearchResultsUpdating, UISearchControllerDelegate, UISearchBarDelegate, UIScrollViewDelegate, DZNEmptyDataSetSource, DZNEmptyDataSetDelegate>

@property (nonatomic, weak) IBOutlet UITableView *tableView;
@property (nonatomic, strong) NCViewRichWorkspace *viewRichWorkspace;

@property (nonatomic, strong) tableMetadata *metadata;
Expand Down
3 changes: 2 additions & 1 deletion iOSClient/Main/CCMain.m
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ - (void)viewDidLoad
_cellTrashImage = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"trash"] width:50 height:50 color:[UIColor whiteColor]];

// delegate
self.tableView.delegate = self;
self.tableView.tableFooterView = [UIView new];
self.tableView.emptyDataSetDelegate = self;
self.tableView.emptyDataSetSource = self;
Expand Down Expand Up @@ -166,6 +167,7 @@ - (void)viewDidLoad
self.navigationItem.searchController = self.searchController;
self.searchController.hidesNavigationBarDuringPresentation = true;
self.navigationController.navigationBar.prefersLargeTitles = true;
self.navigationItem.hidesSearchBarWhenScrolling = true;
self.navigationItem.largeTitleDisplayMode = UINavigationItemLargeTitleDisplayModeAlways;
[self.navigationController.navigationBar sizeToFit];

Expand Down Expand Up @@ -217,7 +219,6 @@ - (void)viewWillAppear:(BOOL)animated
[self updateNavBarShadow:self.tableView force:false];
if(_isViewDidLoad && _isRoot) {
self.navigationItem.hidesSearchBarWhenScrolling = false;
[self.navigationController.navigationBar sizeToFit];
}
// test
if (appDelegate.activeAccount.length == 0)
Expand Down
55 changes: 29 additions & 26 deletions iOSClient/Main/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="DGE-qR-SnB" kind="relationship" relationship="rootViewController" id="Zy5-nA-QZa"/>
<segue destination="Qyv-Eo-LeA" kind="relationship" relationship="rootViewController" id="Y3c-wh-B5R"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="k95-tV-JJx" userLabel="First Responder" sceneMemberID="firstResponder"/>
Expand Down Expand Up @@ -437,36 +437,39 @@
<point key="canvasLocation" x="10484" y="1218"/>
</scene>
<!--Main-->
<scene sceneID="5Py-sI-zil">
<scene sceneID="tgH-1R-Pha">
<objects>
<tableViewController storyboardIdentifier="CCMain" extendedLayoutIncludesOpaqueBars="YES" id="DGE-qR-SnB" customClass="CCMain" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="idK-Vi-sZF">
<viewController storyboardIdentifier="CCMain" extendedLayoutIncludesOpaqueBars="YES" id="Qyv-Eo-LeA" customClass="CCMain" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="QRE-ju-M4I">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="lCY-Ug-mrO">
<rect key="frame" x="0.0" y="28" width="414" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="lCY-Ug-mrO" id="ZmT-UI-0kb">
<rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="DGE-qR-SnB" id="gUu-C3-ycj"/>
<outlet property="delegate" destination="DGE-qR-SnB" id="Q2x-eV-dQq"/>
</connections>
</tableView>
<navigationItem key="navigationItem" id="EkG-fE-q92"/>
<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="dC6-NQ-0Td">
<rect key="frame" x="0.0" y="140" width="414" height="708"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<connections>
<outlet property="dataSource" destination="Qyv-Eo-LeA" id="8v3-Et-JVZ"/>
<outlet property="delegate" destination="Qyv-Eo-LeA" id="CeL-Eu-Cur"/>
</connections>
</tableView>
</subviews>
<constraints>
<constraint firstItem="dC6-NQ-0Td" firstAttribute="leading" secondItem="Sqy-z1-MI5" secondAttribute="leading" id="AAp-Xf-P1c"/>
<constraint firstItem="dC6-NQ-0Td" firstAttribute="top" secondItem="Sqy-z1-MI5" secondAttribute="top" id="BrC-GS-MSF"/>
<constraint firstItem="Sqy-z1-MI5" firstAttribute="trailing" secondItem="dC6-NQ-0Td" secondAttribute="trailing" id="DBL-Bo-AUz"/>
<constraint firstItem="Sqy-z1-MI5" firstAttribute="bottom" secondItem="dC6-NQ-0Td" secondAttribute="bottom" constant="-35" id="d6p-eB-e8X"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Sqy-z1-MI5"/>
</view>
<navigationItem key="navigationItem" largeTitleDisplayMode="always" id="2BC-Vb-dXh"/>
<connections>
<segue destination="mtc-lf-PRo" kind="showDetail" identifier="segueDetail" id="hse-Jl-nJQ"/>
<outlet property="tableView" destination="dC6-NQ-0Td" id="hew-Gn-bWh"/>
<segue destination="mtc-lf-PRo" kind="showDetail" identifier="segueDetail" id="2Qm-A6-CfB"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Bg4-W5-lB8" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="stJ-Yx-rVh" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="5214" y="1217"/>
<point key="canvasLocation" x="5213.04347826087" y="1216.7410714285713"/>
</scene>
<!--More-->
<scene sceneID="50a-pn-1yx">
Expand Down Expand Up @@ -651,7 +654,7 @@
</scene>
</scenes>
<inferredMetricsTieBreakers>
<segue reference="hse-Jl-nJQ"/>
<segue reference="2Qm-A6-CfB"/>
</inferredMetricsTieBreakers>
<resources>
<image name="avatar" width="25" height="25"/>
Expand Down