-2

I want a create a special footer in my View.

Who would look something like that. enter image description here

So you would have to swipe right on the footer, to make appears the two button instead. To have the same effect as when you swipe right on a cell for exemple in the Mail app.

My question is what would be the best way to create this special footer ? And how ?

Community
  • 1
  • 1
Luis
  • 533
  • 1
  • 6
  • 19

1 Answers1

0

This could be done in a lot of ways, i will show you a very basic one.

You do your view, with the two containers. In the first container you got the "Swipe right" label in a view, and underneath it there is the "Finish" and "Delete" container set up. Than you hide the "finish" and "delete" container view (hidden = true).

On the top container view you add a swipe gesture, and when that gets fired, you hide (hidden = true) the top container "Swipe right" view, and show (hidden = false) the bottom container.

dirtydanee
  • 6,081
  • 2
  • 27
  • 43
  • The fact that it could be done in a lot of ways, is why i'm asking the question. What would be the best way of doing that? Even if what you just answered seems a very valid way of doing it – Luis Oct 13 '15 at 09:58
  • It is a valid way to do it, but you can always customize a solution for your needs. What would be the best? maybe more info would help, but i think the above solution is pretty solid. – dirtydanee Oct 13 '15 at 10:36
  • I'm gonna try it i'll let you know – Luis Oct 13 '15 at 12:24
  • The best would be more than a swipe, it's a dragging gesture like the one on a cell in the Mail app, so i'm not really sure your technique with containers really works with what i want to do. What do you think ? – Luis Oct 13 '15 at 13:34
  • well, i do not know for sure what do you mean under the "one on a cell in the Mail app". There is built in native control, which allows you to do something like you want. take a look at this: http://stackoverflow.com/questions/3309484/uitableviewcell-show-delete-button-on-swipe But this is for UITableViewCell, and this is not for presenting multiple options, it present only a delete button, while the cells content remains partly visible. – dirtydanee Oct 13 '15 at 15:34
  • Yeah that's pretty much the effect i want, but with two options and without a part, partly visible – Luis Oct 13 '15 at 15:40
  • i would rethink on what you need. Using a control like this will provide for pretty bad UX. And bad UX will result confused users, what will result bad ratings. – dirtydanee Oct 13 '15 at 15:42
  • You really think it's bad UX? Sounds easy to understand for an user. You swipe/drag a big button, who reveals underneath two different buttons with two different actions. – Luis Oct 13 '15 at 15:45
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/92162/discussion-between-luis-and-dirtydanee). – Luis Oct 13 '15 at 15:46