Skip to content

Commit

Permalink
Merge branch 'develop' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
YuigaWada committed Sep 6, 2020
2 parents f46268d + 9abb2fb commit 6819940
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 16 deletions.
4 changes: 4 additions & 0 deletions MissCat.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
8DEB422D2478FCA500994439 /* DropdownMenuViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DEB422C2478FCA500994439 /* DropdownMenuViewController.swift */; };
8DEFF31C239BD45700142802 /* ProfileViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DEFF31B239BD45700142802 /* ProfileViewModel.swift */; };
8DEFF31E239BD4F200142802 /* ProfileModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DEFF31D239BD4F200142802 /* ProfileModel.swift */; };
8DF0F68F25049F6C00CEAA03 /* UIViewController+NavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DF0F68E25049F6C00CEAA03 /* UIViewController+NavigationController.swift */; };
8DF49FA224445B0500C4D2B2 /* TrendViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DF49FA124445B0500C4D2B2 /* TrendViewController.swift */; };
8DF7E3CE24DDEC6500D29018 /* ShareAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8DF7E3CD24DDEC6500D29018 /* ShareAssets.xcassets */; };
8DF7E3D024DDF03F00D29018 /* AccountsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DF7E3CF24DDF03F00D29018 /* AccountsViewController.swift */; };
Expand Down Expand Up @@ -410,6 +411,7 @@
8DEB422C2478FCA500994439 /* DropdownMenuViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DropdownMenuViewController.swift; sourceTree = "<group>"; };
8DEFF31B239BD45700142802 /* ProfileViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileViewModel.swift; sourceTree = "<group>"; };
8DEFF31D239BD4F200142802 /* ProfileModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileModel.swift; sourceTree = "<group>"; };
8DF0F68E25049F6C00CEAA03 /* UIViewController+NavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+NavigationController.swift"; sourceTree = "<group>"; };
8DF49FA124445B0500C4D2B2 /* TrendViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrendViewController.swift; sourceTree = "<group>"; };
8DF7E3CD24DDEC6500D29018 /* ShareAssets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = ShareAssets.xcassets; sourceTree = "<group>"; };
8DF7E3CF24DDF03F00D29018 /* AccountsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountsViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -563,6 +565,7 @@
8DEB21C4243B0C1300E4D1EB /* Error+MissCat.swift */,
8D2D52462443DA2A00712F48 /* UserModel+MissCat.swift */,
8DAE90C9248A257E008391A3 /* MisskeyKit+MissCat.swift */,
8DF0F68E25049F6C00CEAA03 /* UIViewController+NavigationController.swift */,
);
path = Extension;
sourceTree = "<group>";
Expand Down Expand Up @@ -1450,6 +1453,7 @@
files = (
8D16656923A0DB3100C03764 /* MFMEngine.swift in Sources */,
8D5D2C4A24487C6E00D15974 /* DirectMessageViewModel.swift in Sources */,
8DF0F68F25049F6C00CEAA03 /* UIViewController+NavigationController.swift in Sources */,
8D9702D1248DF86B0000524A /* AccountCellViewModel.swift in Sources */,
8D3036F62385DA8900BA6D38 /* PostViewModel.swift in Sources */,
8D3037002388F71E00BA6D38 /* MisskeyTextView.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// UIViewController+NavigationController.swift
// MissCat
//
// Created by Yuiga Wada on 2020/09/06.
// Copyright © 2020 Yuiga Wada. All rights reserved.
//

import UIKit

extension UIViewController: UIGestureRecognizerDelegate {
// たまにnavigationControllerが機能しなくなってフリーズするため、フリーズしないように
// 参考→ https://stackoverflow.com/a/36637556
public func navigationController(_ navigationController: UINavigationController, didShow viewController: UIViewController, animated: Bool) {
if navigationController.viewControllers.count > 1 {
self.navigationController?.interactivePopGestureRecognizer?.delegate = self
navigationController.interactivePopGestureRecognizer?.isEnabled = true
} else {
self.navigationController?.interactivePopGestureRecognizer?.delegate = nil
navigationController.interactivePopGestureRecognizer?.isEnabled = false
}
}
}
14 changes: 1 addition & 13 deletions MissCat/View/Main/HomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extension HomeViewController {
}
}

class HomeViewController: PolioPagerViewController, UIGestureRecognizerDelegate {
class HomeViewController: PolioPagerViewController {
private var isXSeries = UIScreen.main.bounds.size.height > 811
private let footerTabHeight: CGFloat = 55
private var initialized: Bool = false
Expand Down Expand Up @@ -224,18 +224,6 @@ class HomeViewController: PolioPagerViewController, UIGestureRecognizerDelegate
return true
}

// たまにnavigationControllerが機能しなくなってフリーズするため、フリーズしないように
// 参考→ https://stackoverflow.com/a/36637556
func navigationController(_ navigationController: UINavigationController, didShow viewController: UIViewController, animated: Bool) {
if navigationController.viewControllers.count > 1 {
self.navigationController?.interactivePopGestureRecognizer?.delegate = self
navigationController.interactivePopGestureRecognizer?.isEnabled = true
} else {
self.navigationController?.interactivePopGestureRecognizer?.delegate = nil
navigationController.interactivePopGestureRecognizer?.isEnabled = false
}
}

// MARK: Design

private func setupPolioPager() {
Expand Down
5 changes: 2 additions & 3 deletions MissCat/View/Reusable/NoteCell/nib/PromotionCell.xib
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand All @@ -16,7 +16,6 @@
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XHz-Ml-pT2">
<rect key="frame" x="20" y="0.0" width="49.5" height="27"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="bullhorn" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="N3s-id-Dgh">
<rect key="frame" x="20" y="10" width="49.5" height="17"/>
Expand Down

0 comments on commit 6819940

Please sign in to comment.