mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-09-22 11:03:21 -04:00
Search tabor drop shadow drawing performance enhancement
This commit is contained in:
parent
dd3bb7f1f0
commit
f70d0c152b
@ -10,7 +10,7 @@ import UIKit
|
||||
|
||||
class SearchTabController: UIViewController, UIScrollViewDelegate {
|
||||
|
||||
@IBOutlet weak var tabsContainer: UIView!
|
||||
@IBOutlet weak var tabsContainer: TabsContainerView!
|
||||
@IBOutlet weak var scrollView: UIScrollView!
|
||||
|
||||
private let indicatorView = UIView()
|
||||
@ -37,11 +37,6 @@ class SearchTabController: UIViewController, UIScrollViewDelegate {
|
||||
tabsContainer.addSubview(indicatorView)
|
||||
indicatorView.backgroundColor = UIColor.themeColor
|
||||
|
||||
tabsContainer.layer.masksToBounds = false
|
||||
tabsContainer.layer.shadowOffset = CGSizeMake(0, 0)
|
||||
tabsContainer.layer.shadowOpacity = 0.5
|
||||
tabsContainer.layer.shadowRadius = 2.0
|
||||
|
||||
buttons = [mainPageButton, historyButton, settingButton]
|
||||
mainPageButton.setImage(UIImage(named: "MainPage")?.imageWithRenderingMode(.AlwaysTemplate), forState: .Normal)
|
||||
mainPageButton.setImage(UIImage(named: "MainPage_filled")?.imageWithRenderingMode(.AlwaysTemplate), forState: .Selected)
|
||||
|
@ -36,7 +36,7 @@
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>35</string>
|
||||
<string>46</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
|
@ -984,7 +984,7 @@
|
||||
<rect key="frame" x="0.0" y="44" width="600" height="556"/>
|
||||
<color key="backgroundColor" red="0.97946714743589747" green="0.97946714743589747" blue="0.97946714743589747" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</scrollView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IhM-7L-w7W">
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IhM-7L-w7W" customClass="TabsContainerView" customModule="Kiwix" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="44"/>
|
||||
<subviews>
|
||||
<visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lcU-Sh-nVA">
|
||||
|
27
Kiwix-iOS/View/ShadowView.swift
Normal file
27
Kiwix-iOS/View/ShadowView.swift
Normal file
@ -0,0 +1,27 @@
|
||||
//
|
||||
// ShadowView.swift
|
||||
// Kiwix
|
||||
//
|
||||
// Created by Chris Li on 6/14/16.
|
||||
// Copyright © 2016 Chris. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class TabsContainerView: UIView {
|
||||
|
||||
override func drawRect(rect: CGRect) {
|
||||
layer.masksToBounds = false
|
||||
|
||||
layer.shadowOffset = CGSizeMake(0, 0)
|
||||
layer.shadowRadius = 4.0
|
||||
layer.shadowOpacity = 0.5
|
||||
layer.shadowRadius = 2.0
|
||||
}
|
||||
|
||||
override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
layer.shadowPath = UIBezierPath(rect: bounds).CGPath
|
||||
}
|
||||
|
||||
}
|
@ -270,6 +270,7 @@
|
||||
97E609F41D103DED00EBCB9D /* TodayViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E609F31D103DED00EBCB9D /* TodayViewController.swift */; };
|
||||
97E609F71D103DED00EBCB9D /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97E609F51D103DED00EBCB9D /* MainInterface.storyboard */; };
|
||||
97E609FB1D103DED00EBCB9D /* Kiwix-iOSWidget.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 97E609EF1D103DED00EBCB9D /* Kiwix-iOSWidget.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
97E60A021D10423A00EBCB9D /* ShadowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E60A011D10423A00EBCB9D /* ShadowView.swift */; };
|
||||
97E891691CA976E90001CA32 /* FileManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E891681CA976E90001CA32 /* FileManager.swift */; };
|
||||
AEFF409D8D5B53BC90700424 /* Pods_Kiwix_OSX.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBAF14EE0505901A1570F23F /* Pods_Kiwix_OSX.framework */; };
|
||||
BECDBCEF4720E3E86FE63989 /* Pods_Kiwix_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6CEA715EBFC96C75E73447A7 /* Pods_Kiwix_iOS.framework */; };
|
||||
@ -304,13 +305,6 @@
|
||||
remoteGlobalIDString = 97A2AB871C1B80FF00052E74;
|
||||
remoteInfo = Kiwix;
|
||||
};
|
||||
97E609F91D103DED00EBCB9D /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 97A2AB801C1B80FF00052E74 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 97E609EE1D103DED00EBCB9D;
|
||||
remoteInfo = "Kiwix-iOSWidget";
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
@ -554,6 +548,7 @@
|
||||
97E609F31D103DED00EBCB9D /* TodayViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayViewController.swift; sourceTree = "<group>"; };
|
||||
97E609F61D103DED00EBCB9D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = "<group>"; };
|
||||
97E609F81D103DED00EBCB9D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
97E60A011D10423A00EBCB9D /* ShadowView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ShadowView.swift; sourceTree = "<group>"; };
|
||||
97E891681CA976E90001CA32 /* FileManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FileManager.swift; path = Kiwix/FileManager.swift; sourceTree = "<group>"; };
|
||||
B14E5F8A97964014F99EAD4E /* Pods-Kiwix-iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Kiwix-iOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Kiwix-iOS/Pods-Kiwix-iOS.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
B3B41D59F4B010C559B18D3D /* Pods-Kiwix-iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Kiwix-iOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-Kiwix-iOS/Pods-Kiwix-iOS.release.xcconfig"; sourceTree = "<group>"; };
|
||||
@ -830,6 +825,7 @@
|
||||
971A10281D022AD5007FC62C /* LTBarButtonItem.swift */,
|
||||
971A10291D022AD5007FC62C /* RefreshHUD.swift */,
|
||||
971A102A1D022AD5007FC62C /* SearchBar.swift */,
|
||||
97E60A011D10423A00EBCB9D /* ShadowView.swift */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
@ -1377,7 +1373,6 @@
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
97E609FA1D103DED00EBCB9D /* PBXTargetDependency */,
|
||||
);
|
||||
name = "Kiwix-iOS";
|
||||
productName = Kiwix;
|
||||
@ -1848,6 +1843,7 @@
|
||||
979CB6591D05C44F005E1BA1 /* UserNotificationCapability.swift in Sources */,
|
||||
97254FDF1C2644560056950B /* ZIMMultiReader.swift in Sources */,
|
||||
971A105A1D022DAD007FC62C /* LibraryLocalTBVC.swift in Sources */,
|
||||
97E60A021D10423A00EBCB9D /* ShadowView.swift in Sources */,
|
||||
979CB6BD1D05C520005E1BA1 /* Operation.swift in Sources */,
|
||||
971A10441D022C54007FC62C /* SettingTBVCD.swift in Sources */,
|
||||
971A10671D022E0A007FC62C /* MainVCOtherD.swift in Sources */,
|
||||
@ -1975,11 +1971,6 @@
|
||||
target = 97A2AB871C1B80FF00052E74 /* Kiwix-iOS */;
|
||||
targetProxy = 97A2ABAB1C1B810000052E74 /* PBXContainerItemProxy */;
|
||||
};
|
||||
97E609FA1D103DED00EBCB9D /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 97E609EE1D103DED00EBCB9D /* Kiwix-iOSWidget */;
|
||||
targetProxy = 97E609F91D103DED00EBCB9D /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
@ -2343,7 +2334,7 @@
|
||||
INFOPLIST_FILE = "Kiwix-iOSWidget/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.kiwix.iOSWidget;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = self.Kiwix.iOSWidget;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
@ -2358,7 +2349,7 @@
|
||||
INFOPLIST_FILE = "Kiwix-iOSWidget/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.kiwix.iOSWidget;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = self.Kiwix.iOSWidget;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
|
@ -6,6 +6,7 @@ Kiwix for iOS is an offline reader for wikipedia. Our mission is to give people
|
||||
## What's to come in version 1.6
|
||||
- Table of contents
|
||||
- Some iPad search interface design changes
|
||||
- Spotlight search integration (will index opened / read articles)
|
||||
|
||||
### Stuff may be added in 1.6
|
||||
- Library enhancement
|
||||
|
Loading…
x
Reference in New Issue
Block a user