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

Avatar Row #53

Open
justdan0227 opened this issue Jul 4, 2021 · 8 comments
Open

Avatar Row #53

justdan0227 opened this issue Jul 4, 2021 · 8 comments

Comments

@justdan0227
Copy link

is it possible to have an AVATAR or USER IMAGE row for settings where you would let the user click on the image to go to an image picker? I can handle the picker but not sure how to get a button of size X:Y as a row?

@neoneye
Copy link
Owner

neoneye commented Jul 5, 2021

How would you prefer the api to be like? Example of code that would work best for you.

@justdan0227
Copy link
Author

justdan0227 commented Jul 6, 2021

Could be as easy as an extension to .botton where you could specify row height, pass image to be displayed and cropping / rounded corners and then I could handle image selection with something like YPImagePicker and then you would have a full user settings panel available

@neoneye
Copy link
Owner

neoneye commented Jul 7, 2021

I'm confused.

  • Can you send a screenshot or a drawing of what it should look like?
  • Can you suggest a code snippet for what it ideally should be?

@justdan0227
Copy link
Author

justdan0227 commented Jul 8, 2021

So I implemented it with a custom cell and a callback!!! I'll package up and submit

CleanShot 2021-07-08 at 15 56 55@2x

@neoneye
Copy link
Owner

neoneye commented Jul 9, 2021

Looks good.

Avatar row, this seems like a recurring ui pattern. However I don't think this should be a core control in SwiftyFORM, since it's subject to fashion changes. Perhaps some designers wants text side by side with the avatar. Perhaps different border styles.

Your avatar row will be a great addition to the example app. If it's ok with you, I may add your code to the example app. Maybe I make a few tweaks.

@justdan0227
Copy link
Author

@neoneye sounds good! If you want to add it to the example app, do you want me to push a branch? or just send you a snippit

@neoneye
Copy link
Owner

neoneye commented Jul 14, 2021

You can mail me a snippet. Preferable a zip with something that compiles out of the box. I will extract the avatar code and insert it. My mail is neoneye@gmail.com

@allistoncarlos
Copy link

Hi @justdan0227 do you have an example that I could use?

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

3 participants