Demo project updates

This commit is contained in:
Leo Natan
2020-11-01 15:12:36 +02:00
parent 6076c46c15
commit 8564d1574b
9 changed files with 439 additions and 117 deletions
@@ -21,6 +21,7 @@
393F23291E16CF90000E969D /* LocationsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 393F23281E16CF90000E969D /* LocationsController.swift */; };
393F232B1E16D1E4000E969D /* HigherSearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 393F232A1E16D1E4000E969D /* HigherSearchBar.swift */; };
39631FAD230DA03E0059D119 /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 39631FAC230DA03E0059D119 /* SceneDelegate.m */; };
39756327254ED9EB0066981E /* DemoGallery.m in Sources */ = {isa = PBXBuildFile; fileRef = 39756326254ED9EB0066981E /* DemoGallery.m */; };
397C56281B7538A5007A67F0 /* DemoAlbumTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 397C56271B7538A5007A67F0 /* DemoAlbumTableViewController.swift */; };
397C562A1B753A45007A67F0 /* MusicCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 397C56291B753A45007A67F0 /* MusicCell.swift */; };
39837A201B756F1A004D2DA9 /* RandomColors.m in Sources */ = {isa = PBXBuildFile; fileRef = 39837A1F1B756F1A004D2DA9 /* RandomColors.m */; };
@@ -151,6 +152,8 @@
393F232A1E16D1E4000E969D /* HigherSearchBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HigherSearchBar.swift; sourceTree = "<group>"; };
39631FAB230DA03D0059D119 /* SceneDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = "<group>"; };
39631FAC230DA03E0059D119 /* SceneDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = "<group>"; };
39756325254ED9EB0066981E /* DemoGallery.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DemoGallery.h; sourceTree = "<group>"; };
39756326254ED9EB0066981E /* DemoGallery.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DemoGallery.m; sourceTree = "<group>"; };
397C560D1B74DA66007A67F0 /* Music.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Music.storyboard; sourceTree = "<group>"; };
397C56271B7538A5007A67F0 /* DemoAlbumTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DemoAlbumTableViewController.swift; sourceTree = "<group>"; };
397C56291B753A45007A67F0 /* MusicCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MusicCell.swift; sourceTree = "<group>"; };
@@ -295,6 +298,8 @@
397C560B1B74D47D007A67F0 /* Demo - Testing Scene (Objective-C) */ = {
isa = PBXGroup;
children = (
39756325254ED9EB0066981E /* DemoGallery.h */,
39756326254ED9EB0066981E /* DemoGallery.m */,
39277A0D1B58228000293F95 /* FirstViewController.h */,
3988E3571B59C3000039C09B /* FirstViewController.m */,
399748701D5652250079492B /* DemoPopupContentViewController.h */,
@@ -504,6 +509,7 @@
files = (
3908C34C1E7C9EA200451B5D /* SettingsTableViewController.m in Sources */,
39BBA86924FEC32F00D9712A /* ManualLayoutCustomBarViewController.swift in Sources */,
39756327254ED9EB0066981E /* DemoGallery.m in Sources */,
397C56281B7538A5007A67F0 /* DemoAlbumTableViewController.swift in Sources */,
39837A241B758541004D2DA9 /* DemoMusicPlayerController.swift in Sources */,
393F23271E16C192000E969D /* CustomMapBarViewController.swift in Sources */,
@@ -377,7 +377,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Correct bottom safe area" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="N4q-gh-14d">
<rect key="frame" x="88.000000000000014" y="705" width="199.33333333333337" height="20"/>
<rect key="frame" x="88.000000000000014" y="656" width="199.33333333333337" height="20"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/>
<nil key="highlightedColor"/>
</label>
@@ -838,7 +838,211 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Enabled" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="eB1-oU-dLQ">
<rect key="frame" x="15" y="0.0" width="320" height="44"/>
<rect key="frame" x="16" y="0.0" width="311" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection headerTitle="Background Visual Effect" id="WOX-NN-Cet">
<cells>
<tableViewCell clipsSubviews="YES" tag="-1" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="WHV-zh-WvE" style="IBUITableViewCellStyleDefault" id="YfF-fy-124">
<rect key="frame" x="16" y="1127.3333320617676" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="YfF-fy-124" id="ywV-Vs-P0Y">
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Default" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="WHV-zh-WvE">
<rect key="frame" x="16" y="0.0" width="311" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection footerTitle="Material styles which automatically adapt to the user interface style. Available in iOS 13.0 and above." id="ZW3-i0-O05">
<cells>
<tableViewCell clipsSubviews="YES" tag="16" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="bsE-Up-WH5" style="IBUITableViewCellStyleDefault" id="nsY-a3-gaM">
<rect key="frame" x="16" y="1207.3333320617676" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="nsY-a3-gaM" id="tVX-kV-XGp">
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Ultra Thin Material" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="bsE-Up-WH5">
<rect key="frame" x="16" y="0.0" width="311" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" tag="17" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="GGa-2Q-GTh" style="IBUITableViewCellStyleDefault" id="4VE-0d-L70">
<rect key="frame" x="16" y="1251.3333320617676" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="4VE-0d-L70" id="smt-q4-9UH">
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Thin Material" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="GGa-2Q-GTh">
<rect key="frame" x="16" y="0.0" width="311" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" tag="18" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="60H-iC-NPB" style="IBUITableViewCellStyleDefault" id="EZC-VC-zty">
<rect key="frame" x="16" y="1295.3333320617676" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="EZC-VC-zty" id="FsW-eQ-FQ2">
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Material" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="60H-iC-NPB">
<rect key="frame" x="16" y="0.0" width="311" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" tag="19" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="xE8-o6-gd8" style="IBUITableViewCellStyleDefault" id="hdf-Sk-IYF">
<rect key="frame" x="16" y="1339.3333320617676" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="hdf-Sk-IYF" id="gnV-vv-uCE">
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Thick Material" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="xE8-o6-gd8">
<rect key="frame" x="16" y="0.0" width="311" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" tag="20" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="naY-jX-Bey" style="IBUITableViewCellStyleDefault" id="htv-Fm-soG">
<rect key="frame" x="16" y="1383.3333320617676" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="htv-Fm-soG" id="BBT-3M-Imr">
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Chrome Material" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="naY-jX-Bey">
<rect key="frame" x="16" y="0.0" width="311" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection id="QCy-uk-ZdA">
<string key="footerTitle">Styles which automatically show one of the traditional blur styles, depending on the user interface style. Available in iOS 10.0 and above.</string>
<cells>
<tableViewCell clipsSubviews="YES" tag="14" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="kdk-lY-0sJ" style="IBUITableViewCellStyleDefault" id="Vcj-D9-Ng4">
<rect key="frame" x="16" y="1507.3333320617676" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Vcj-D9-Ng4" id="kX1-SH-612">
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Regular" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="kdk-lY-0sJ">
<rect key="frame" x="16" y="0.0" width="311" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" tag="15" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="X9J-B5-9qW" style="IBUITableViewCellStyleDefault" id="sL6-oN-eYu">
<rect key="frame" x="16" y="1551.3333320617676" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="sL6-oN-eYu" id="CKo-KA-DxU">
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Prominent" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="X9J-B5-9qW">
<rect key="frame" x="16" y="0.0" width="311" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection footerTitle="Traditional blur styles. Available in iOS 8.0 and above." id="9XO-hG-YZx">
<cells>
<tableViewCell clipsSubviews="YES" tag="10" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="n74-oK-aY7" style="IBUITableViewCellStyleDefault" id="dz9-IT-icv">
<rect key="frame" x="16" y="1675.3333320617676" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="dz9-IT-icv" id="FpA-Fe-m6I">
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Extra Light" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="n74-oK-aY7">
<rect key="frame" x="16" y="0.0" width="311" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" tag="11" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="r1L-BA-sVc" style="IBUITableViewCellStyleDefault" id="ie7-be-7YO">
<rect key="frame" x="16" y="1719.3333320617676" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ie7-be-7YO" id="grB-5w-AKR">
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Light" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="r1L-BA-sVc">
<rect key="frame" x="16" y="0.0" width="311" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" tag="12" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="HT5-2O-D0b" style="IBUITableViewCellStyleDefault" id="fKI-yn-BYK">
<rect key="frame" x="16" y="1763.3333320617676" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="fKI-yn-BYK" id="bu8-cI-2am">
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Dark" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="HT5-2O-D0b">
<rect key="frame" x="16" y="0.0" width="311" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<nil key="textColor"/>
@@ -852,14 +1056,14 @@
<tableViewSection headerTitle="Extend Bars Under Safe Area" id="0W7-xT-AZi">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="sIK-iP-AtO" style="IBUITableViewCellStyleDefault" id="7bH-7q-HqN">
<rect key="frame" x="16" y="1127.3333320617676" width="343" height="44"/>
<rect key="frame" x="16" y="1891.3333320617676" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="7bH-7q-HqN" id="YXC-P3-oY3">
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Enabled" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="sIK-iP-AtO">
<rect key="frame" x="15" y="0.0" width="320" height="44"/>
<rect key="frame" x="16" y="0.0" width="311" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<nil key="textColor"/>
@@ -876,14 +1080,14 @@
<tableViewSection headerTitle="Customizations" id="0NB-NV-YLQ">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="9Me-vs-LNp" style="IBUITableViewCellStyleDefault" id="mlW-fM-oUd">
<rect key="frame" x="16" y="1227.3333320617676" width="343" height="44"/>
<rect key="frame" x="16" y="1991.3333320617676" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="mlW-fM-oUd" id="q0T-kQ-4Np">
<rect key="frame" x="0.0" y="0.0" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Enabled" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="9Me-vs-LNp">
<rect key="frame" x="15" y="0.0" width="320" height="44"/>
<rect key="frame" x="16" y="0.0" width="311" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<nil key="textColor"/>
@@ -1022,7 +1226,7 @@
<segue reference="08s-5F-WiR"/>
<segue reference="FoD-Oj-irL"/>
<segue reference="SIC-fE-4sh"/>
<segue reference="auw-I8-7ys"/>
<segue reference="vxl-RK-Hyn"/>
<segue reference="1U6-NV-9t4"/>
<segue reference="iD8-2E-cMh"/>
<segue reference="19O-Tx-Ntx"/>
@@ -0,0 +1,14 @@
//
// DemoGallery.h
// LNPopupControllerExample
//
// Created by Leo Natan on 11/1/20.
// Copyright © 2020 Leo Natan. All rights reserved.
//
@import UIKit;
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_END
@@ -0,0 +1,90 @@
//
// DemoGallery.m
// LNPopupControllerExample
//
// Created by Leo Natan on 11/1/20.
// Copyright © 2020 Leo Natan. All rights reserved.
//
#import "DemoGallery.h"
#if LNPOPUP
@import LNPopupController;
#import "IntroWebViewController.h"
#endif
@interface DemoGalleryControllerTableView : UITableView @end
@implementation DemoGalleryControllerTableView
- (BOOL)canBecomeFocused
{
return NO;
}
@end
@interface DemoGalleryController : UITableViewController @end
@implementation DemoGalleryController
{
#if LNPOPUP
IntroWebViewController* _demoVC;
#endif
}
- (IBAction)unwindToGallery:(UIStoryboardSegue *)unwindSegue { }
- (void)viewDidLoad
{
[super viewDidLoad];
#if LNPOPUP
_demoVC = [IntroWebViewController new];
self.navigationController.popupBar.marqueeScrollEnabled = YES;
#if ! TARGET_OS_MACCATALYST
self.navigationController.popupContentView.popupCloseButtonStyle = LNPopupCloseButtonStyleNone;
#endif
if (@available(iOS 13.0, *))
{
self.navigationController.popupContentView.popupCloseButton.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
}
#endif
}
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
#if LNPOPUP
[self.navigationController presentPopupBarWithContentViewController:_demoVC animated:YES completion:nil];
#endif
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if(segue.destinationViewController.modalPresentationStyle != UIModalPresentationFullScreen)
{
[self.tableView deselectRowAtIndexPath:self.tableView.indexPathForSelectedRow animated:YES];
}
}
- (BOOL)tableView:(UITableView *)tableView shouldHighlightRowAtIndexPath:(NSIndexPath *)indexPath
{
#if !TARGET_OS_MACCATALYST
if(((indexPath.section == 0 && indexPath.row > 3) || indexPath.section > 0) && NSProcessInfo.processInfo.operatingSystemVersion.majorVersion < 13)
{
UITableViewCell* cell = [tableView cellForRowAtIndexPath:indexPath];
UIAlertController* alert = [UIAlertController alertControllerWithTitle:nil message:[NSString stringWithFormat:@"The “%@” scene requires iOS 13 and above.", cell.textLabel.text] preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
[self presentViewController:alert animated:YES completion:nil];
return NO;
}
#endif
return YES;
}
@end
@@ -55,7 +55,7 @@
if(self.view.traitCollection.userInterfaceStyle != _lastStyle)
{
_lastStyle = self.view.traitCollection.userInterfaceStyle;
self.view.backgroundColor = LNRandomAdaptiveInvertedColor();
self.view.backgroundColor = LNSeedAdaptiveInvertedColor(@"Popup");
}
}
else
@@ -63,7 +63,7 @@
if(_lastStyle == 0)
{
_lastStyle++;
self.view.backgroundColor = LNRandomDarkColor();
self.view.backgroundColor = LNSeedDarkColor(@"Popup");
}
}
@@ -8,7 +8,6 @@
#if LNPOPUP
@import LNPopupController;
#import "IntroWebViewController.h"
#endif
#import "FirstViewController.h"
#import "DemoPopupContentViewController.h"
@@ -44,83 +43,6 @@ extern UIImage* LNSystemImage(NSString* named);
@end
@interface DemoGalleryControllerTableView : UITableView @end
@implementation DemoGalleryControllerTableView
- (BOOL)canBecomeFocused
{
return NO;
}
@end
@interface DemoGalleryController : UITableViewController @end
@implementation DemoGalleryController
{
#if LNPOPUP
IntroWebViewController* _demoVC;
#endif
}
- (IBAction)unwindToGallery:(UIStoryboardSegue *)unwindSegue { }
- (void)viewDidLoad
{
[super viewDidLoad];
#if LNPOPUP
_demoVC = [IntroWebViewController new];
self.navigationController.popupBar.marqueeScrollEnabled = YES;
#if ! TARGET_OS_MACCATALYST
self.navigationController.popupContentView.popupCloseButtonStyle = LNPopupCloseButtonStyleNone;
#endif
if (@available(iOS 13.0, *))
{
self.navigationController.popupContentView.popupCloseButton.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
}
#endif
}
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
#if LNPOPUP
[self.navigationController presentPopupBarWithContentViewController:_demoVC animated:YES completion:nil];
#endif
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if(segue.destinationViewController.modalPresentationStyle != UIModalPresentationFullScreen)
{
[self.tableView deselectRowAtIndexPath:self.tableView.indexPathForSelectedRow animated:YES];
}
}
- (BOOL)tableView:(UITableView *)tableView shouldHighlightRowAtIndexPath:(NSIndexPath *)indexPath
{
#if !TARGET_OS_MACCATALYST
if(((indexPath.section == 0 && indexPath.row > 3) || indexPath.section > 0) && NSProcessInfo.processInfo.operatingSystemVersion.majorVersion < 13)
{
UITableViewCell* cell = [tableView cellForRowAtIndexPath:indexPath];
UIAlertController* alert = [UIAlertController alertControllerWithTitle:nil message:[NSString stringWithFormat:@"The “%@” scene requires iOS 13 and above.", cell.textLabel.text] preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
[self presentViewController:alert animated:YES completion:nil];
return NO;
}
#endif
return YES;
}
@end
@interface FirstView : UIView @end
@implementation FirstView
@@ -143,6 +65,9 @@ extern UIImage* LNSystemImage(NSString* named);
#endif
>
@property (nonatomic, strong) NSString* colorSeedString;
@property (nonatomic) NSInteger colorSeedCount;
@end
@implementation FirstViewController
@@ -157,11 +82,20 @@ extern UIImage* LNSystemImage(NSString* named);
{
[super viewDidLoad];
if(self.colorSeedString == nil)
{
// self.colorSeedString = [LoremIpsum sentence];
// self.colorSeedString = [NSString stringWithFormat:@"%@", @(arc4random())];
self.colorSeedString = @"nil";
self.colorSeedCount = 0;
}
NSString* seed = [NSString stringWithFormat:@"%@%@", self.colorSeedString, self.colorSeedCount == 0 ? @"" : [NSString stringWithFormat:@"%@", @(self.colorSeedCount)]];
if (@available(iOS 13.0, *))
{
self.view.backgroundColor = LNRandomAdaptiveColor();
self.view.backgroundColor = LNSeedAdaptiveColor(seed);
} else {
self.view.backgroundColor = LNRandomLightColor();
self.view.backgroundColor = LNSeedLightColor(seed);
}
self.navigationController.delegate = self;
@@ -366,6 +300,12 @@ extern UIImage* LNSystemImage(NSString* named);
[targetVC.popupBar setTintColor:[UIColor yellowColor]];
}
NSNumber* effectOverride = [NSUserDefaults.standardUserDefaults objectForKey:PopupSettingsVisualEffectViewBlurEffect];
if(effectOverride != nil)
{
targetVC.popupBar.backgroundStyle = effectOverride.unsignedIntegerValue;
}
targetVC.shouldExtendPopupBarUnderSafeArea = [NSUserDefaults.standardUserDefaults boolForKey:PopupSettingsExtendBar];
// if (@available(iOS 13.0, *))
@@ -390,6 +330,11 @@ extern UIImage* LNSystemImage(NSString* named);
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
[segue.destinationViewController setHidesBottomBarWhenPushed:YES];
if([segue.destinationViewController isKindOfClass:FirstViewController.class])
{
[(FirstViewController*)segue.destinationViewController setColorSeedString:self.colorSeedString];
[(FirstViewController*)segue.destinationViewController setColorSeedCount:self.colorSeedCount + 1];
}
}
#pragma mark UINavigationControllerDelegate
@@ -28,13 +28,17 @@ extern UIImage* LNSystemImage(NSString* named);
_webView = [WKWebView new];
[_webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://github.com/LeoNatan/LNPopupController"]]];
_webView.translatesAutoresizingMaskIntoConstraints = NO;
// _webView.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
if (@available(iOS 13.0, *)) {
_webView.scrollView.automaticallyAdjustsScrollIndicatorInsets = NO;
}
[self.view addSubview:_webView];
UIBlurEffectStyle style;
if (@available(iOS 13.0, *)) {
style = UIBlurEffectStyleSystemChromeMaterial;
style = UIBlurEffectStyleSystemThinMaterial;
} else {
style = UIBlurEffectStyleProminent;
style = UIBlurEffectStyleRegular;
}
UIVisualEffectView* effectView = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:style]];
effectView.translatesAutoresizingMaskIntoConstraints = NO;
@@ -64,4 +68,11 @@ extern UIImage* LNSystemImage(NSString* named);
[UIApplication.sharedApplication openURL:[NSURL URLWithString:@"https://github.com/LeoNatan/LNPopupController"] options:@{} completionHandler:nil];
}
- (void)viewSafeAreaInsetsDidChange
{
[super viewSafeAreaInsetsDidChange];
_webView.scrollView.scrollIndicatorInsets = self.view.safeAreaInsets;
}
@end
@@ -15,5 +15,6 @@ extern NSString* const PopupSettingsCloseButtonStyle;
extern NSString* const PopupSettingsMarqueeStyle;
extern NSString* const PopupSettingsEnableCustomizations;
extern NSString* const PopupSettingsExtendBar;
extern NSString* const PopupSettingsVisualEffectViewBlurEffect;
@interface SettingsTableViewController : UITableViewController @end
@@ -15,6 +15,7 @@ NSString* const PopupSettingsCloseButtonStyle = @"PopupSettingsCloseButtonStyle"
NSString* const PopupSettingsMarqueeStyle = @"PopupSettingsMarqueeStyle";
NSString* const PopupSettingsEnableCustomizations = @"PopupSettingsEnableCustomizations";
NSString* const PopupSettingsExtendBar = @"PopupSettingsExtendBar";
NSString* const PopupSettingsVisualEffectViewBlurEffect = @"PopupSettingsVisualEffectViewBlurEffect";
@interface SettingsTableViewController ()
{
@@ -36,10 +37,20 @@ NSString* const PopupSettingsExtendBar = @"PopupSettingsExtendBar";
- (void)viewDidLoad {
[super viewDidLoad];
_sectionToKeyMapping = @{@0: PopupSettingsBarStyle, @1: PopupSettingsInteractionStyle, @2: PopupSettingsProgressViewStyle, @3: PopupSettingsCloseButtonStyle, @4: PopupSettingsMarqueeStyle};
_sectionToKeyMapping = @{
@0: PopupSettingsBarStyle,
@1: PopupSettingsInteractionStyle,
@2: PopupSettingsProgressViewStyle,
@3: PopupSettingsCloseButtonStyle,
@4: PopupSettingsMarqueeStyle,
@5: PopupSettingsVisualEffectViewBlurEffect,
@6: PopupSettingsVisualEffectViewBlurEffect,
@7: PopupSettingsVisualEffectViewBlurEffect,
@8: PopupSettingsVisualEffectViewBlurEffect,
};
_customizations.on = [[NSUserDefaults standardUserDefaults] boolForKey:PopupSettingsEnableCustomizations];
_extendBars.on = [[NSUserDefaults standardUserDefaults] boolForKey:PopupSettingsExtendBar];
_customizations.on = [NSUserDefaults.standardUserDefaults boolForKey:PopupSettingsEnableCustomizations];
_extendBars.on = [NSUserDefaults.standardUserDefaults boolForKey:PopupSettingsExtendBar];
}
- (void)didReceiveMemoryWarning
@@ -58,16 +69,27 @@ NSString* const PopupSettingsExtendBar = @"PopupSettingsExtendBar";
cell.accessoryType = UITableViewCellAccessoryNone;
cell.accessoryView = nil;
cell.selectionStyle = UITableViewCellSelectionStyleDefault;
NSUInteger value = [[[NSUserDefaults standardUserDefaults] objectForKey:key] unsignedIntegerValue];
if(value == 0xFFFF)
if(key == PopupSettingsVisualEffectViewBlurEffect)
{
value = 3;
NSNumber* effectStyle = [NSUserDefaults.standardUserDefaults objectForKey:PopupSettingsVisualEffectViewBlurEffect];
if((cell.tag == -1 && effectStyle == nil) || (effectStyle != nil && cell.tag == effectStyle.integerValue + 10))
{
cell.accessoryType = UITableViewCellAccessoryCheckmark;
}
}
if(indexPath.row == value)
else
{
cell.accessoryType = UITableViewCellAccessoryCheckmark;
NSUInteger value = [[NSUserDefaults.standardUserDefaults objectForKey:key] unsignedIntegerValue];
if(value == 0xFFFF)
{
value = 3;
}
if(indexPath.row == value)
{
cell.accessoryType = UITableViewCellAccessoryCheckmark;
}
}
}
@@ -75,9 +97,9 @@ NSString* const PopupSettingsExtendBar = @"PopupSettingsExtendBar";
}
- (IBAction)_resetButtonTapped:(UIBarButtonItem *)sender {
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:PopupSettingsEnableCustomizations];
[NSUserDefaults.standardUserDefaults setBool:NO forKey:PopupSettingsEnableCustomizations];
[_sectionToKeyMapping enumerateKeysAndObjectsUsingBlock:^(NSNumber * _Nonnull key, NSString * _Nonnull obj, BOOL * _Nonnull stop) {
[[NSUserDefaults standardUserDefaults] setObject:@0 forKey:obj];
[NSUserDefaults.standardUserDefaults setObject:@0 forKey:obj];
}];
[self.tableView reloadData];
@@ -85,32 +107,61 @@ NSString* const PopupSettingsExtendBar = @"PopupSettingsExtendBar";
- (IBAction)_demoSwitchValueDidChange:(UISwitch*)sender
{
[[NSUserDefaults standardUserDefaults] setBool:sender.isOn forKey:PopupSettingsEnableCustomizations];
[NSUserDefaults.standardUserDefaults setBool:sender.isOn forKey:PopupSettingsEnableCustomizations];
}
- (IBAction)_extendBarsSwitchValueDidChange:(UISwitch*)sender
{
[[NSUserDefaults standardUserDefaults] setBool:sender.isOn forKey:PopupSettingsExtendBar];
[NSUserDefaults.standardUserDefaults setBool:sender.isOn forKey:PopupSettingsExtendBar];
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString* key = _sectionToKeyMapping[@(indexPath.section)];
NSUInteger prevValue = [[[NSUserDefaults standardUserDefaults] objectForKey:key] unsignedIntegerValue];
if(prevValue == 0xFFFF)
{
prevValue = 3;
}
[tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:prevValue inSection:indexPath.section]].accessoryType = UITableViewCellAccessoryNone;
[tableView cellForRowAtIndexPath:indexPath].accessoryType = UITableViewCellAccessoryCheckmark;
NSUInteger value = indexPath.row;
if(value == 3)
if(key == PopupSettingsVisualEffectViewBlurEffect)
{
value = 0xFFFF;
NSNumber* previous = [NSUserDefaults.standardUserDefaults objectForKey:key];
UITableViewCell* previousCell = nil;
if(previous != nil)
{
previousCell = [tableView viewWithTag:previous.integerValue + 10];
}
else
{
previousCell = [tableView viewWithTag:-1];
}
previousCell.accessoryType = UITableViewCellAccessoryNone;
UITableViewCell* cell = [tableView cellForRowAtIndexPath:indexPath];
cell.accessoryType = UITableViewCellAccessoryCheckmark;
if(cell.tag == -1)
{
[NSUserDefaults.standardUserDefaults removeObjectForKey:key];
}
else
{
[NSUserDefaults.standardUserDefaults setObject:@(cell.tag - 10) forKey:key];
}
}
else
{
NSUInteger prevValue = [[NSUserDefaults.standardUserDefaults objectForKey:key] unsignedIntegerValue];
if(prevValue == 0xFFFF)
{
prevValue = 3;
}
[tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:prevValue inSection:indexPath.section]].accessoryType = UITableViewCellAccessoryNone;
[tableView cellForRowAtIndexPath:indexPath].accessoryType = UITableViewCellAccessoryCheckmark;
NSUInteger value = indexPath.row;
if(value == 3)
{
value = 0xFFFF;
}
[NSUserDefaults.standardUserDefaults setObject:@(value) forKey:key];
}
[[NSUserDefaults standardUserDefaults] setObject:@(value) forKey:key];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}