GithubHelp home page GithubHelp logo

ayushn21 / avatarimageview Goto Github PK

View Code? Open in Web Editor NEW
255.0 255.0 37.0 1.48 MB

DEPRECATED!!! --- Use https://github.com/neone/NDAvatarApp

License: MIT License

Objective-C 1.43% Swift 96.43% Ruby 2.14%
ios ios-lib ios-ui swift uiimageview

avatarimageview's Introduction

Hey, I'm Ayush ๐Ÿ‘‹

I'm a freelance web developer based in London, UK. I like boring tech like Ruby on Rails and the Hotwire approach to building websites.

I built and maintain a mailing list app called Scattergun. I'm also on the core team of the Bridgetown project.

My experience and portfolio is available on my website. I spout my opinions regularly on my blog.



I'm available for contract work and consulting in Ruby, Rails, static HTML websites and pretty much anything Web related. Drop me a line and let's chat!

avatarimageview's People

Contributors

basthomas avatar jblorenzo avatar loryhuz avatar sanketfirodiya avatar wow-such-amazing 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  avatar  avatar  avatar  avatar

avatarimageview's Issues

Image for UIButton

Can you please provide us one updated version with option for setting image for uibutton

How to create AvatarImageView pragmatically?

(1)

self.avatarImageView = AvatarImageView(frame: CGRectZero)

This gives me error issue "expected a coder: NSCoder" ?

should we write like this in init:

override public init(frame: CGRect) {
        super.init(frame: frame)
        setup()
    }

Tried to use, but no success:

CGContextFillRects: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context  and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
fatal error: unexpectedly found nil while unwrapping an Optional value

Can you write example with pragmatic usage?

(2) Another question, how about with SDWebImage, how we should update asynchronous image in avatar, which downloaded?

Not working!?

It keeps failing the the following line:
avatarImageView.dataSource = ExampleData()

in the func showInitials() function!?

Choose smaller of the two dimensions or make a perfect circle

When width of image is bigger than height and it is taken as the radius the image drawn in circle is not perfect circle but a rectangle with two sides circular. Is ther ea way to force smaller of the two edges to be taken as reference. or maybe just fit the image the best way without losing orientation or aspect ratio in between a circle.

Image Isn't Rounded

When providing a contact object's image to the datasource as the avatar, it is not getting rounded. The example does not get rounded when providing an image either.

EXC_BAD_Access

Hi,
Thanks a lot for pod!
I am trying to implement it into my app but I am running into an issue.
I'm trying to add it in a cell of my table view controller.
I am using swift 2.2 and the pod "AvatarImageView", '1.1.1'

Here is my table_cell file

`import UIKit
import AvatarImageView

struct TableAvatarImageConfig: AvatarImageViewConfiguration {
static let shape: Shape? = .Circle
}

class ContactPageTableViewCell: UITableViewCell {

// - // MARK: - When Cell Loads
override func awakeFromNib() {
    super.awakeFromNib()
}

override func setSelected(selected: Bool, animated: Bool) {
    super.setSelected(selected, animated: animated)

    // Configure the view for the selected state
}

@IBOutlet weak var ContactPageImageView: AvatarImageView! {
    didSet {
        ContactPageImageView.configuration = TableAvatarImageConfig()
    }
}

@IBOutlet weak var ContactPageNameLabel: UILabel!
@IBOutlet weak var ContactPageNicknameLabel: UILabel!
@IBOutlet weak var ContactPagePhoneNumberLabel: UILabel!

}I have an error or the line ContactPageImageView.configuration = TableAvatarImageConfig()`
EXC_BAD_ACESS (code=2, adress=0x7f9f74d3d1b0)

Any ideas of what I'm doing wrong?

Thanks

Swift 3

Hello Ayush,

I have updated my code to swift 3.0 but when I try to run, it gives me an legacy swift version error.
Later when I convert the dependency code, it gives me so many errors. Could you please check if the it is working or not?

screen shot 2016-09-20 at 4 37 09 pm

Add white border

I am using the circular shape. What would be the recommended way to add a white border (of arbitrary thickness) arround it?

Swift 4

Plans to migrate the code to Swift 4?

Border on Avatar view?

Do you have a suggestion of how we could add a border to the Avatar view? I don't see that as a current option. Looks great otherwise and could be very useful. Thanks for the code...

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.