I cannot find any documentation or tutorial for this.
On iOS it is easy to add a "swipe right-to-left" action to a UITableViewCell. Such as in the mail app you can swipe on an email to get more options.
This same feature is implemented in the watchOS Messages app as seen here:
As you can see, I've swipe across on a cell and the "Bin" option is now shown.
How would I implement this?
Sorry for the vague question, but I just cannot find it anywhere.
Related
I am implementing a way for the user to see a time-stamp for all messages when the any message is swiped to the left. Similar to the way iMessage does it.
(source: tekrevue.com)
Approach 1:
I invested some time in researching on StackOverflow. The nearest I got an answer to my problem:
How to Show time like iMessage iPhone app in UITableView
This question was asked in 2014, is meant for Objective-C and the only answer suggests to implement a Pod. I am gonna be honest with you, I am not a big fan of Pods. They do slow down my project.
(To be fair, the GitHub mentioned in the comments of the linked question was updated to Swift)
Approach 2:
After the first Approach, I was thinking about using Cell-Actions / Swipe-able TableView Cells.
The idea was to replace the buttons by a single label. This would get the job done but it wouldn't "feel the same" as the users are used to from iMessage. Only one message would slide instead of all messages and when the user stops swiping, the cells/messages wouldn't animate back to their standard position.
I have already tried with UITableview expand collapse but does not got effect like Swiggy payments wallet design screen. We need to create same design wallet design like Swiggy food delivery app in objective-c.
It's very basic question to start with but I would suggest learn more about the UITableView using default and custom cell you can achieve the same layout. Please do home work before asking such a simple question. If you want to learn then read and code. If facing issue while implementing then do come here with question.
https://www.ralfebert.de/ios-examples/uikit/uitableviewcontroller/custom-cells/
Custom UITableViewCell from nib in Swift
I'd like to have similar result than the iOS native Mail app,
where you can swipe left a message to see additional actions
Graphical example here.
The questions is, should I implement a component from the scratch or is something out there that I can reuse ?
I've been using dancormier/react-native-swipeout but there are others, such as jlevine22/react-native-swipeable-element for instance.
For my Apple Watch project, I'd like to be able to swipe between different page views, and have page dots at the bottom of the screen. How do I do this in Xcode? I've tried everything and I can't seem to figure it out.
use next-page segue to implement the page based navigation.
refer to this tutorial
http://natashatherobot.com/watchkit-page-based-navigation/
also tho this apple developer forum page
https://developer.apple.com/library/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/InterfaceStyles.html
In Apple's 2014 WWDC keynote, they showed a gesture in the Mail app that lets you long-swipe to delete a message immediately. This is different than swiping then tapping the delete button. Below is a screen shot of it in action. Does anyone know if this is available as a public API yet? I've looked through the WWDC session videos and the documentation to no avail.
I would prefer to use native APIs rather than custom classes if possible; this is why I'm asking.
Thanks in advance.
I found that it wasn't possible with a standard tableview, you have to implement it yourself with custom table view cells.
There are a number of libraries that do this, I found MGSwipeTableCell to be the best - it has a demo app which replicates the behavior of iOS 8 mail and is a good example.
As of iOS 11, there is finally a formal way to do this using the UIKit APIs. They're called "swipe actions" now, and they can be "leading" or "trailing" and even include an image. The UITableViewDelegate method is called leadingSwipeActionsConfigurationForRowAt. I learned about this from Use Yiur Loaf