10000 GitHub - zh-wang/TwitterGifComposer: Native iOS twitter composer does NOT support gif. This composer will help if you need to post gifs.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Native iOS twitter composer does NOT support gif. This composer will help if you need to post gifs.

License

Notifications You must be signed in to change notification settings

zh-wang/TwitterGifComposer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TwitterGifComposer

CI Status Version License Platform

Usage

Native iOS twitter composer does NOT support gif. This composer will help if you need to post gifs.

Although this project does NOT rely on FLAnimatedImage, but it can do better with it.

    class ViewController: UIViewController, TwitterGifComposerDelegate {

    /* ... */

    @IBAction func touchUpInside(sender: AnyObject) {

        var path = NSBundle.mainBundle().pathForResource("abc", ofType: "gif")
        var data = NSData(contentsOfFile: path!)
        self.twitterGifComposer = TwitterGifComposer.defaultComposer(delegate: self, rootViewController: self).withText("Post Gif").withGifData(data!)

        /*
            The image view in composer only show static image, by default.
            But if FLAnimatedImage is also imported, you can replace it as FLAnimatedImageView
        */
        var animatedImageView = FLAnimatedImageView(frame: CGRectZero)
        animatedImageView.animatedImage = FLAnimatedImage(GIFData: data!)
        animatedImageView.startAnimating()
        self.twitterGifComposer!.attachFLAnimatedImageView(animatedImageView)

        /* show the composer */
        self.twitterGifComposer!.show()

    }

    func onPostFailed() { }

    func onPostSuccessed() { }

    func onStopPost() { }

alt tag

Requirements

iOS 8.0

Installation

TwitterGifComposer is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "TwitterGifComposer"

Author

zh-wang, viennakanon@gmail.com

License

TwitterGifComposer is available under the MIT license. See the LICENSE file for more info.

About

Native iOS twitter composer does NOT support gif. This composer will help if you need to post gifs.

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0