Skip to content

Commit

Permalink
Minor adjustments to demo project
Browse files Browse the repository at this point in the history
Demo project now compiles only on iOS 10.2 and above. The framework will support iOS 9.0 and above.
  • Loading branch information
LeoNatan committed Sep 17, 2017
1 parent 9f9d451 commit 9021e4c
Show file tree
Hide file tree
Showing 7 changed files with 191 additions and 184 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -537,7 +537,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -556,7 +556,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = S9QFG2VH2E;
INFOPLIST_FILE = LNPopupControllerExample/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.LeoNatan.LNPopupControllerExample-";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -578,7 +578,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = S9QFG2VH2E;
INFOPLIST_FILE = LNPopupControllerExample/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.LeoNatan.LNPopupControllerExample-";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ class DemoAlbumTableViewController: UITableViewController {
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()

if(ProcessInfo.processInfo.operatingSystemVersion.majorVersion <= 10) {
if ProcessInfo.processInfo.operatingSystemVersion.majorVersion >= 10 {
navigationController?.navigationBar.isTranslucent = false
}

if ProcessInfo.processInfo.operatingSystemVersion.majorVersion <= 10 {
let insets = UIEdgeInsetsMake(topLayoutGuide.length, 0, bottomLayoutGuide.length, 0)
tableView.contentInset = insets
tableView.scrollIndicatorInsets = insets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ - (IBAction)_presentBar:(id)sender
UILabel* topLabel = [UILabel new];
topLabel.text = NSLocalizedString(@"Top", @"");
topLabel.textColor = [UIColor whiteColor];
topLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline];
topLabel.translatesAutoresizingMaskIntoConstraints = NO;
[demoVC.view addSubview:topLabel];
[NSLayoutConstraint activateConstraints:@[[topLabel.topAnchor constraintEqualToAnchor:demoVC.topLayoutGuide.bottomAnchor],
Expand All @@ -126,6 +127,7 @@ - (IBAction)_presentBar:(id)sender
UILabel* bottomLabel = [UILabel new];
bottomLabel.text = NSLocalizedString(@"Bottom", @"");
bottomLabel.textColor = [UIColor whiteColor];
bottomLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline];
bottomLabel.translatesAutoresizingMaskIntoConstraints = NO;
[demoVC.view addSubview:bottomLabel];
[NSLayoutConstraint activateConstraints:@[[bottomLabel.bottomAnchor constraintEqualToAnchor:demoVC.bottomLayoutGuide.topAnchor],
Expand Down Expand Up @@ -160,7 +162,7 @@ - (IBAction)_presentBar:(id)sender
[targetVC.popupBar setBackgroundStyle:UIBlurEffectStyleDark];
[targetVC.popupBar setTintColor:[UIColor yellowColor]];
}

[targetVC presentPopupBarWithContentViewController:demoVC animated:YES completion:nil];
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13156.6" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="ZEq-0J-wEi">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="ZEq-0J-wEi">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13137.5"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand Down Expand Up @@ -136,14 +136,14 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="7 min to work" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="erT-G3-HBb">
<rect key="frame" x="16" y="19" width="127" height="26.5"/>
<rect key="frame" x="16" y="20.5" width="116" height="24"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle2"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Take Market St." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="CnG-y0-rK9">
<rect key="frame" x="16" y="49.5" width="106" height="18"/>
<rect key="frame" x="16" y="48" width="106" height="18"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
Expand All @@ -161,14 +161,14 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Home" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="YFg-LF-k2d">
<rect key="frame" x="16" y="19" width="57.5" height="26.5"/>
<rect key="frame" x="16" y="20.5" width="52.5" height="24"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle2"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Directions from my location" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="aaO-Yd-xQO">
<rect key="frame" x="16" y="49.5" width="188" height="18"/>
<rect key="frame" x="16" y="48" width="188" height="18"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
Expand All @@ -186,14 +186,14 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Restaurant" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="OJa-Gr-emV">
<rect key="frame" x="16" y="19" width="103" height="26.5"/>
<rect key="frame" x="16" y="20.5" width="94.5" height="24"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle2"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Cheapest prices" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="cOx-0L-Baz">
<rect key="frame" x="16" y="49.5" width="112" height="18"/>
<rect key="frame" x="16" y="48" width="112" height="18"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
Expand All @@ -211,14 +211,14 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Favorites" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="BzK-EW-JJD">
<rect key="frame" x="16" y="19" width="86.5" height="26.5"/>
<rect key="frame" x="16" y="20.5" width="79" height="24"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle2"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="10 Places" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="1Im-KD-s0N">
<rect key="frame" x="16" y="49.5" width="65" height="18"/>
<rect key="frame" x="16" y="48" width="65" height="18"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class PortraitTabBarController: UITabBarController {
super.viewDidLoad()

if ProcessInfo.processInfo.operatingSystemVersion.majorVersion > 9 {
// tabBar.isTranslucent = false
tabBar.isTranslucent = false
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ - (void)viewDidLoad {
_sectionToKeyMapping = @{@0: PopupSettingsBarStyle, @1: PopupSettingsInteractionStyle, @2: PopupSettingsProgressViewStyle, @3: PopupSettingsCloseButtonStyle, @4: PopupSettingsMarqueeStyle};
}

- (void)didReceiveMemoryWarning {
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
Expand Down

0 comments on commit 9021e4c

Please sign in to comment.