Latest 0.1.1
Homepage https://github.com/zh-wang/TwitterGifComposer
License MIT
Platforms ios 8.0, requires ARC
Frameworks Social, Accounts
Authors

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, [email protected]

License

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

Latest podspec

{
    "name": "TwitterGifComposer",
    "version": "0.1.1",
    "summary": "Post gif to twitter easier.",
    "description": "    Native iOS twitter composer does NOT support gif. This composer will help if you need to post gifs.n",
    "homepage": "https://github.com/zh-wang/TwitterGifComposer",
    "screenshots": "http://i.imgur.com/S5Il9FE.png",
    "license": "MIT",
    "authors": {
        "zh-wang": "[email protected]"
    },
    "source": {
        "git": "https://github.com/zh-wang/TwitterGifComposer.git",
        "tag": "0.1.1"
    },
    "social_media_url": "https://twitter.com/viennakanon",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "TwitterGifComposer": [
            "Pod/Assets/*.png"
        ]
    },
    "frameworks": [
        "Social",
        "Accounts"
    ]
}

Pin It on Pinterest

Share This