Skip to content

Commit

Permalink
Merging issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ulmentflam committed Oct 24, 2019
2 parents 9d9c251 + e6025e6 commit 19b05bd
Show file tree
Hide file tree
Showing 11 changed files with 149 additions and 18 deletions.
Binary file added Assets/GiphyLogoEmblemLight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/GiphyLogoEmblemLight@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/GiphyLogoEmblemLight@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion Library/SwiftyGiphyCollectionViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,20 @@ class SwiftyGiphyCollectionViewCell: UICollectionViewCell {

override func prepareForReuse() {
super.prepareForReuse()

imageView.sd_cancelCurrentAnimationImagesLoad()
imageView.sd_cancelCurrentImageLoad()
imageView.sd_setImage(with: nil)
imageView.animatedImage = nil
imageView.image = nil

}

/// Configure the cell for a giphy image set
///
/// - Parameter imageSet: The imageset to configure the cell with
func configureFor(imageSet: GiphyImageSet)
{
imageView.sd_cacheFLAnimatedImage = false
imageView.sd_setShowActivityIndicatorView(true)
imageView.sd_setIndicatorStyle(.gray)
imageView.sd_setImage(with: imageSet.url)
Expand Down
24 changes: 24 additions & 0 deletions Library/SwiftyGiphyViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import UIKit
import SDWebImage
import AVFoundation
import NSTimer_Blocks

Expand Down Expand Up @@ -83,7 +84,13 @@ public class SwiftyGiphyViewController: UIViewController {
super.loadView()

self.title = NSLocalizedString("Giphy", comment: "Giphy")

self.navigationItem.titleView = UIImageView(image: UIImage(named: "GiphyLogoEmblem", in: Bundle(for: SwiftyGiphyViewController.self), compatibleWith: nil))
if #available(iOS 13, *) {
if self.traitCollection.userInterfaceStyle == .dark {
self.navigationItem.titleView = UIImageView(image: UIImage(named: "GiphyLogoEmblemLight", in: Bundle(for: SwiftyGiphyViewController.self), compatibleWith: nil))
}
}

searchController.searchBar.placeholder = NSLocalizedString("Search GIFs", comment: "The placeholder string for the Giphy search field")
searchController.searchResultsUpdater = self
Expand Down Expand Up @@ -202,9 +209,26 @@ public class SwiftyGiphyViewController: UIViewController {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}

public override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
super.traitCollectionDidChange(previousTraitCollection)

if #available(iOS 13.0, *) {
let hasUserInterfaceStyleChanged = previousTraitCollection?.hasDifferentColorAppearance(comparedTo: traitCollection) ?? false
if hasUserInterfaceStyleChanged {
if traitCollection.userInterfaceStyle == .dark {
self.navigationItem.titleView = UIImageView(image: UIImage(named: "GiphyLogoEmblemLight", in: Bundle(for: SwiftyGiphyViewController.self), compatibleWith: nil))
} else {
self.navigationItem.titleView = UIImageView(image: UIImage(named: "GiphyLogoEmblem", in: Bundle(for: SwiftyGiphyViewController.self), compatibleWith: nil))
}
}
}
}

deinit {
NotificationCenter.default.removeObserver(self)
SDImageCache.shared().clearMemory()
SDImageCache.shared().clearDisk(onCompletion: nil)
}

@objc fileprivate func dismissPicker()
Expand Down
18 changes: 9 additions & 9 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
PODS:
- FLAnimatedImage (1.0.12)
- NSTimer-Blocks (0.0.1)
- ObjectMapper (3.3.0)
- SDWebImage/Core (4.0.0)
- SDWebImage/GIF (4.0.0):
- ObjectMapper (3.5.1)
- SDWebImage/Core (4.4.7)
- SDWebImage/GIF (4.4.7):
- FLAnimatedImage (~> 1.0)
- SDWebImage/Core
- SwiftyGiphy (1.2.0):
- SwiftyGiphy (1.3.0):
- FLAnimatedImage (~> 1.0)
- NSTimer-Blocks
- ObjectMapper (~> 3.0)
Expand All @@ -16,7 +16,7 @@ DEPENDENCIES:
- SwiftyGiphy (from `../SwiftyGiphy`)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
https://github.com/CocoaPods/Specs.git:
- FLAnimatedImage
- NSTimer-Blocks
- ObjectMapper
Expand All @@ -29,10 +29,10 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
FLAnimatedImage: 4a0b56255d9b05f18b6dd7ee06871be5d3b89e31
NSTimer-Blocks: 88faf9aef5f250ead087f3f67ae642517083bf36
ObjectMapper: b612bf8c8e99c4dc0bb6013a51f7c27966ed5da9
SDWebImage: 76a6348bdc74eb5a55dd08a091ef298e56b55e41
SwiftyGiphy: 6fb86ca967445826a9b1aa629ce22d970bca579d
ObjectMapper: 70187b8941977c62ccfb423caf6b50be405cabf0
SDWebImage: c10d14a8883ebd89664f02a422006f66a85c0c5d
SwiftyGiphy: 614f076556fd3e8fcab417718f2b9adacef9e6b0

PODFILE CHECKSUM: 99ae6577f47a8d8b2d37875a1c21f2c41e5295fb

COCOAPODS: 1.6.1
COCOAPODS: 1.8.3
10 changes: 7 additions & 3 deletions SwiftyGiphy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
C60B80391E71E45000ECF39E = {
CreatedOnToolsVersion = 8.2.1;
DevelopmentTeam = P87N88ZC7B;
LastSwiftMigration = 1000;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
};
Expand Down Expand Up @@ -274,6 +274,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand Down Expand Up @@ -333,6 +334,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand All @@ -359,12 +361,13 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = P87N88ZC7B;
DYLIB_CURRENT_VERSION = 1;
INFOPLIST_FILE = SwiftyGiphy/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.52inc.SwiftyGiphySample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -374,12 +377,13 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = P87N88ZC7B;
DYLIB_CURRENT_VERSION = 1;
INFOPLIST_FILE = SwiftyGiphy/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.52inc.SwiftyGiphySample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C60B80391E71E45000ECF39E"
BuildableName = "SwiftyGiphySample.app"
BlueprintName = "SwiftyGiphySample"
ReferencedContainer = "container:SwiftyGiphy.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C60B80391E71E45000ECF39E"
BuildableName = "SwiftyGiphySample.app"
BlueprintName = "SwiftyGiphySample"
ReferencedContainer = "container:SwiftyGiphy.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
<AdditionalOption
key = "MallocStackLogging"
value = ""
isEnabled = "YES">
</AdditionalOption>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C60B80391E71E45000ECF39E"
BuildableName = "SwiftyGiphySample.app"
BlueprintName = "SwiftyGiphySample"
ReferencedContainer = "container:SwiftyGiphy.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
8 changes: 8 additions & 0 deletions SwiftyGiphy.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
8 changes: 3 additions & 5 deletions SwiftyGiphy/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?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="YKq-Fr-cW3">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14854.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="YKq-Fr-cW3">
<device id="retina4_7" orientation="portrait" appearance="dark"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13137.5"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14806.4"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand Down

0 comments on commit 19b05bd

Please sign in to comment.