Skip to content

Commit

Permalink
Update sample app style
Browse files Browse the repository at this point in the history
  • Loading branch information
onevcat committed Oct 3, 2021
1 parent dcc79f3 commit f8ba103
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 39 deletions.
17 changes: 0 additions & 17 deletions APNGDemo-iOS/APNGDemo-iOS/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
if #available(iOS 13.0, *) {
let coloredAppearance = UINavigationBarAppearance()
coloredAppearance.backgroundColor = UIColor(red: 68.0 / 255, green: 74.0 / 255, blue: 89.0 / 255, alpha: 1.0)
coloredAppearance.titleTextAttributes = [.foregroundColor: UIColor.white]

UINavigationBar.appearance().standardAppearance = coloredAppearance
}

UINavigationBar.appearance().tintColor = UIColor.white
return true
}

Expand All @@ -66,12 +57,4 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}


}

class NavigationController: UINavigationController {
override var childViewControllerForStatusBarStyle: UIViewController? {
return topViewController
}
}
43 changes: 26 additions & 17 deletions APNGDemo-iOS/APNGDemo-iOS/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16092.1" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="jLs-K8-13n">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="jLs-K8-13n">
<device id="retina4_7" orientation="portrait" appearance="dark"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16082.1"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand All @@ -14,16 +15,17 @@
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="3bB-Rh-zkX">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<color key="tintColor" systemColor="labelColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="cell" id="iuT-Be-kCZ">
<rect key="frame" x="0.0" y="28" width="375" height="44"/>
<rect key="frame" x="0.0" y="44.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="iuT-Be-kCZ" id="Q4H-cf-17K">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
<color key="tintColor" systemColor="labelColor"/>
<connections>
<segue destination="bjL-LU-leO" kind="show" identifier="showDetail" id="itd-PM-eYN"/>
</connections>
Expand All @@ -36,12 +38,13 @@
</tableView>
<navigationItem key="navigationItem" title="APNGKit" id="SMS-j7-Pa8">
<barButtonItem key="leftBarButtonItem" title="Clear Cache" id="8gT-ZY-DiJ">
<color key="tintColor" systemColor="labelColor"/>
<connections>
<action selector="clearCache:" destination="WPS-Xv-atT" id="P1c-Be-fck"/>
</connections>
</barButtonItem>
<barButtonItem key="rightBarButtonItem" systemItem="add" id="zE8-Aq-GAX">
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="tintColor" systemColor="labelColor"/>
<connections>
<segue destination="7hn-Le-1RA" kind="presentation" identifier="showCreate" id="qyt-yL-B5l"/>
</connections>
Expand All @@ -63,7 +66,7 @@
<view key="view" contentMode="scaleToFill" id="tx9-fN-4iX">
<rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="ApS-ct-qEw" userLabel="First Responder" sceneMemberID="firstResponder"/>
Expand All @@ -84,7 +87,7 @@
<subviews>
<view contentMode="center" translatesAutoresizingMaskIntoConstraints="NO" id="5IW-Oc-eee" customClass="APNGImageView" customModule="APNGKit">
<rect key="frame" x="62.5" y="78" width="250" height="250"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="250" id="Umd-eJ-Agm"/>
<constraint firstAttribute="width" constant="250" id="d2P-nY-5oj"/>
Expand All @@ -93,18 +96,16 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Dad-BJ-Xc0">
<rect key="frame" x="16" y="332" width="343" height="0.0"/>
<fontDescription key="fontDescription" type="system" weight="thin" pointSize="12"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="esm-b5-QSO" userLabel="Timing">
<rect key="frame" x="16" y="336" width="343" height="0.0"/>
<fontDescription key="fontDescription" type="system" weight="thin" pointSize="12"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<color key="tintColor" systemColor="labelColor"/>
<constraints>
<constraint firstItem="esm-b5-QSO" firstAttribute="top" secondItem="Dad-BJ-Xc0" secondAttribute="bottom" constant="4" id="8Ou-tR-xdh"/>
<constraint firstAttribute="trailingMargin" secondItem="esm-b5-QSO" secondAttribute="trailing" id="Gez-xp-Aec"/>
Expand All @@ -129,16 +130,16 @@
<!--Navigation Controller-->
<scene sceneID="WMV-Dd-uwZ">
<objects>
<navigationController id="jLs-K8-13n" customClass="NavigationController" customModule="APNGDemo_iOS" customModuleProvider="target" sceneMemberID="viewController">
<navigationController id="jLs-K8-13n" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="nb6-1m-24i">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<color key="barTintColor" red="0.2666666667" green="0.2901960784" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="tintColor" systemColor="labelColor"/>
<textAttributes key="titleTextAttributes">
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="textColor" systemColor="labelColor"/>
</textAttributes>
<textAttributes key="largeTitleTextAttributes">
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="textColor" systemColor="labelColor"/>
</textAttributes>
</navigationBar>
<connections>
Expand All @@ -150,4 +151,12 @@
<point key="canvasLocation" x="-606" y="150"/>
</scene>
</scenes>
<resources>
<systemColor name="labelColor">
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
2 changes: 0 additions & 2 deletions APNGDemo-iOS/APNGDemo-iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,5 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<true/>
<key>UIUserInterfaceStyle</key>
<string>Light</string>
</dict>
</plist>
3 changes: 0 additions & 3 deletions APNGDemo-iOS/APNGDemo-iOS/TableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ class TableViewController: UITableViewController {

override func viewDidLoad() {
super.viewDidLoad()

self.navigationController?.navigationBar.shadowImage = nil
loadData()

tableView.reloadData()
}

Expand Down

0 comments on commit f8ba103

Please sign in to comment.