Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API #4

Closed
shmidt opened this issue Apr 3, 2017 · 2 comments
Closed

API #4

shmidt opened this issue Apr 3, 2017 · 2 comments

Comments

@shmidt
Copy link

shmidt commented Apr 3, 2017

Thanks for sharing.

My suggestion is to make API a little bit more readable by adding couple of classes: Icon and Watermark.

Then, instead:

EFQRCode.generate(
    content: String, 
    inputCorrectionLevel: EFInputCorrectionLevel, 
    size: CGFloat, 
    magnification: UInt?, 
    backgroundColor: UIColor, 
    foregroundColor: UIColor, 
    icon: UIImage?, 
    iconSize: CGFloat?, 
    isIconColorful: Bool, 
    watermark: UIImage?, 
    watermarkMode: EFWatermarkMode, 
    isWatermarkColorful: Bool
)

It will be

EFQRCode.generate(
    content: String, 
    correction: EFInputCorrectionLevel, 
    size: CGFloat, 
    magnification: UInt?, 
    backgroundColor: UIColor, 
    foregroundColor: UIColor, 
    icon: Icon(image: UIImage, size: CGFloat, colorful: Bool)?, 
    watermark: Watermark(image: UIImage, mode: EFWatermarkMode, colorful: Bool)?
)
@EyreFree
Copy link
Member

EyreFree commented Apr 3, 2017

Oh, this is a good idea, I will think about this and add this in the future, maybe next release, thanks, 👍🏻

@EyreFree
Copy link
Member

Fixed in 1.2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants