Code Monkey home page Code Monkey logo

diimageview's Introduction

DIImageView

A Snapchat-like caption integrated within a regular UIImageView.

CI Status Version License Platform

image image

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • iOS 8.3+ and Xcode 8.0+
  • Swift 3.0+

Installation

Manual

Simply add DIImageView.swift into your project.

CocoaPods

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

pod 'DIImageView' => '1.0.2'

Contributors

License

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

diimageview's People

Contributors

danielinoa avatar sirnacnud 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

diimageview's Issues

Mirror/flip the text in the textField

In my app I flip the UIImageView so it's displayed correctly on the screen. This means that the textField on the DIImageView is couse mirrored as well. How can i RE-mirror it so it displays properly? I tried to simply tranform it, but strangely enough it doesn't work.

 if picker.cameraDevice == .Front {
        finishedImage = UIImage(CGImage: image.CGImage, scale: image.scale, orientation: .LeftMirrored)
        previewImageView.transform = CGAffineTransformMakeScale(1, 1)
        // tranforms (rotates the pic so it's not mirrored)

        DIImageView().caption.transform = CGAffineTransformMakeScale(-1, 1) // WORKS (or maybe just in the correct mirrored way)

    } else if picker.cameraDevice == .Rear {
        finishedImage = UIImage(CGImage: image.CGImage, scale: image.scale, orientation: .LeftMirrored)
        previewImageView.transform = CGAffineTransformMakeScale(-1, 1)
        // tranforms (rotates the pic so it's not mirrored)

        DIImageView().caption.transform = CGAffineTransformMakeScale(1, 1) // DOES NOT WORK
    }

Can not add caption

i am using DIImageView in a storyboard by subclassing UIImageView to DIImageView,
using this way i can not add captions, any suggestion?

Save the Photo

Hi Daniel.
First congrats for your code!

Does this code for text stripe above images also works in the image capture controller ? Or the image can only be passed to another controller to handle the stripe text like your code.

How to save the image with the text stripe on the photo ?

Thnx and cheers!

I can't set DIImageView in another view.

Hi @danielinoa

I want to add DIImageView in to other view that is IBOutlet in storyboard. When I set that image is not displaying.

    let imageView = DIImageView(image: postImage)
    imageView.contentMode = .scaleAspectFill
    self.imageContainerView = imageView

If I add in view then its working file

    let imageView = DIImageView(image: postImage)
    imageView.contentMode = .scaleAspectFill
    view = imageView

Please help me I want to add image view in another view.

Thanks,
Pratik

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.