Git Product home page Git Product logo

swiftygiphy's People

Contributors

amyleecodes avatar ulmentflam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swiftygiphy's Issues

Not Setting my API Key

In didFinishLaunchingWithOptions, i put my API Key:

SwiftyGiphyAPI.shared.apiKey = "Gv0dsQKgUCWJCZLEzTXmlD7EnVZpKjjZ"

but SwiftyGiphyAPI.share.apiKey prints out as an optional, which causes every function in SwiftyGiphyAPI.swift to read apiKey as nil. So, I keep getting the "You need to set your Giphy API key before using SwiftyGiphy." message.

I've tried optional unwrapping and force unwrapping to no avail. Any idea how to fix this?

Thanks in advance for your help!

giphyControllerDidCancel not getting called

Hi, I am trying out this library with swift 4.2. It works fine so far except that giphyControllerDidCancel doesn't get called. giphyControllerDidSelectGif works fine though.

Here's my code.
class DPChatController: UIViewController, SwiftyGiphyViewControllerDelegate{

func giphyControllerDidSelectGif(controller: SwiftyGiphyViewController, item: GiphyItem) {
    
    if let gifDownSized = item.downsizedImage {
        //detailImageView.sd_setImage(with: gifDownSized.url)
    }
    
    // close gif selection controller via delegate. This doesn't work!
    print("Am in Did Select gif")
    //controller.dismiss(animated: true)
    self.navigationController?.popViewController(animated: true)
    self.inputBar.isHidden = false
}

func giphyControllerDidCancel(controller: SwiftyGiphyViewController) {
    print("Am in Did Cancel")
    self.navigationController?.popViewController(animated: true)
    self.inputBar.isHidden = false
}

@IBAction func chooseProfileActions(_ sender: Any) {
messageTxt.resignFirstResponder()
inputBar.isHidden = true
let profileOptions = UIAlertController(title: "Choose options", message: "", preferredStyle: .actionSheet)
profileOptions.addAction(UIAlertAction(title: "Library", style: .default, handler: { (UIAlertAction) in
self.openPhotoLibrary(isPhoto: false)
}))
profileOptions.addAction(UIAlertAction(title: "Camera", style: .default, handler: { (UIAlertAction) in
self.openPhotoLibrary(isPhoto: true)
}))
profileOptions.addAction(UIAlertAction(title: "GIF", style: .default, handler: { (UIAlertAction) in
self.giphy.navigationController?.delegate = self
self.giphy.delegate = self
self.navigationController?.pushViewController(self.giphy, animated: true)
}))
profileOptions.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: { (UIAlertAction) in
print("User selected Cancel option")
self.inputBar.isHidden = false
})
}

Navigation Bar is hidden when you Push SwiftyGiphyViewController

If the pushing view controller has its Navigation Bar Hidden.

The moment you:
let giphy = SwiftyGiphyViewController()
self.navigationController?.pushViewController(giphy, animated: true)

The SwiftyGiphyViewController will inherent the hidden Navigation Bar setting and it will not show the required "Powered by Giphy" Navigation Bar.

This issue happens whenever you are not working with Storyboard, or your views are programatic.

iOS 13 issues.

Can we get an update here?
With sub-dependencies update please.

SwiftyGiphy
which depends on SDWebImage/GIF was resolved to 4.4.7,
which depends on SDWebImage/Core (= 4.4.7)

The very old dependencies are blocking our other libraries. Which are breaking under iOS.

Swift 5 Support

Hello, any plans on adding swift 5 support?

From looking at the code-base I think the only thing that needs to be updated is the podspec.

@Objc Support?

Any plan to support objective c calls into this library? It seems none of the functions are decorated with @objc so you cannot use this library in objective c.

1.3.1 Release does not compile.

There are 2 issues with the 1.3.1 release that dont allow for the project to be compiled.

  1. SwiftGiphyViewController.swift L:217
    Value of type 'UITraitCollection' has no member 'hasDifferentColorAppearance'

  2. SwiftGiphyCollectionViewCell.swift L:86
    Value of type 'FLAnimatedImageView' has no member 'sd_cacheFLAnimatedImage'

SwiphGiphyViewController only shows the search bar

I read the code and saw the loadView() function which changes the navigation title, etc. But it seems that small part isn't being called. Also, the controller.dismiss function doesn't actually dismiss swiftgiphyviewcontroller.

class DetailViewController: UIViewController, UITextFieldDelegate, UINavigationControllerDelegate, UIImagePickerControllerDelegate, SwiftyGiphyViewControllerDelegate  {
    
    func giphyControllerDidSelectGif(controller: SwiftyGiphyViewController, item: GiphyItem) {
        
        if let gifDownSized = item.downsizedImage {
            detailImageView.sd_setImage(with: gifDownSized.url)
        }
        
        // close gif selection controller via delegate. This doesn't work!
        controller.dismiss(animated: true)
    }
    
    func giphyControllerDidCancel(controller: SwiftyGiphyViewController) {
        print("hello")
    }
    
    var timerModel: TimerModel!
    
    // Bottom toolbar button on the detailviewcontroller page
    @IBAction func useGiphy(_ sender: UIBarButtonItem) {
        // Open the giphy search menu

        // A viewcontroller inside the storyboard with a segue from detailviewcontroller to a viewcontroller of type swiftygiphycontroller

        performSegue(withIdentifier: "gifSelectorSegue", sender: self)
    }
}

My DetailViewController does inherit UINavigationDelegate and SwiftyGiphyDelegate

screen shot 2018-10-13 at 9 25 30 am

Build issue with Xcode 10.2.1

Showing Recent Messages
Build system information
error: /Users/iraniya/Downloads/SwiftyGiphy-master/Pods/Target Support Files/Pods-SwiftyGiphySample/Pods-SwiftyGiphySample.debug.xcconfig: unable to open file (in target "SwiftyGiphySample" in project "SwiftyGiphy") (in target 'SwiftyGiphySample')

I have tried pod install pod update but stuck at

"Analyzing dependencies
[!] The version of CocoaPods used to generate the lockfile (1.6.1) is higher than the version of the current executable (1.5.3). Incompatibility issues may arise.
Fetching podspec for SwiftyGiphy from ../SwiftyGiphy
[!] No podspec found for SwiftyGiphy in ../SwiftyGiphy"

Thanks in advance :-)

Unbounded memory issues

First of all, thanks for developing such an awesome repo–I've been using the pod like crazy and appreciate all the work you guys have done with this.

Unfortunately, I've been having a lot of memory issues with using this. 1) as I scroll down further and further, my memory increase is unbounded. 2) that wouldn't be a problem except this memory is never freed when I pop/dismiss the SwiftyGiphyViewController. All the mallocs and CGImageData are saved in memory and none of the objects are ever released.

image

I've spent 50-60 hours tracing through the code line by line and trying to figure out how to fix the issue but I haven't been able to find it. At first, I thought it was something simple with the collection view objects not being correctly dereferenced, then I tried looking deeper into each of the components that make up each cell (all the subviews, etc). I tried deinit-ing latestTrendingResponse and latestSearchResponse and even every individual element inside (as well as pretty much any other place I could find saved gifs). I've tried keeping track of other things such as how many CornerRoundingViews were kept in memory at different points in time. I've spent many frustrating hours in Instruments to no avail.

It would be beyond awesome to be able to use this repo in production. If you guys have some time, would you be able to look into fixing the memory issues? Perhaps you guys might be able to fix it more quickly than I'd be able to since you guys are the ones who actually wrote the code.

Thanks so much!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.