neoneye/SwiftyFORM

Avatar Row

justdan0227 opened this issue · 8 comments

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?

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

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

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?

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

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.

@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

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

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