How do I use UILongPressGestureRecognizer with a UICollectionViewCell in Swift?
I would like to figure out how to println the indexPath of a UICollectionViewCell when I long press on a cell.
How can I do that in Swift?
I have looked all over for an example of how to do this; can't find one in Swift.
ios swift uigesturerecognizer uicollectionviewcell
add a comment |
I would like to figure out how to println the indexPath of a UICollectionViewCell when I long press on a cell.
How can I do that in Swift?
I have looked all over for an example of how to do this; can't find one in Swift.
ios swift uigesturerecognizer uicollectionviewcell
Show us what you've tried.
– rdelmar
Mar 24 '15 at 20:02
I have tried so many things it would be impossible to put all that in here. I have tried using the info at these links: stackoverflow.com/questions/23392485/… - tagwith.com/… - freshconsulting.com/create-drag-and-drop-uitableview-swift TONS of other pages.
– webmagnets
Mar 24 '15 at 20:05
add a comment |
I would like to figure out how to println the indexPath of a UICollectionViewCell when I long press on a cell.
How can I do that in Swift?
I have looked all over for an example of how to do this; can't find one in Swift.
ios swift uigesturerecognizer uicollectionviewcell
I would like to figure out how to println the indexPath of a UICollectionViewCell when I long press on a cell.
How can I do that in Swift?
I have looked all over for an example of how to do this; can't find one in Swift.
ios swift uigesturerecognizer uicollectionviewcell
ios swift uigesturerecognizer uicollectionviewcell
asked Mar 24 '15 at 19:55
webmagnetswebmagnets
61132053
61132053
Show us what you've tried.
– rdelmar
Mar 24 '15 at 20:02
I have tried so many things it would be impossible to put all that in here. I have tried using the info at these links: stackoverflow.com/questions/23392485/… - tagwith.com/… - freshconsulting.com/create-drag-and-drop-uitableview-swift TONS of other pages.
– webmagnets
Mar 24 '15 at 20:05
add a comment |
Show us what you've tried.
– rdelmar
Mar 24 '15 at 20:02
I have tried so many things it would be impossible to put all that in here. I have tried using the info at these links: stackoverflow.com/questions/23392485/… - tagwith.com/… - freshconsulting.com/create-drag-and-drop-uitableview-swift TONS of other pages.
– webmagnets
Mar 24 '15 at 20:05
Show us what you've tried.
– rdelmar
Mar 24 '15 at 20:02
Show us what you've tried.
– rdelmar
Mar 24 '15 at 20:02
I have tried so many things it would be impossible to put all that in here. I have tried using the info at these links: stackoverflow.com/questions/23392485/… - tagwith.com/… - freshconsulting.com/create-drag-and-drop-uitableview-swift TONS of other pages.
– webmagnets
Mar 24 '15 at 20:05
I have tried so many things it would be impossible to put all that in here. I have tried using the info at these links: stackoverflow.com/questions/23392485/… - tagwith.com/… - freshconsulting.com/create-drag-and-drop-uitableview-swift TONS of other pages.
– webmagnets
Mar 24 '15 at 20:05
add a comment |
5 Answers
5
active
oldest
votes
First you your view controller need to be UIGestureRecognizerDelegate
. Then add a UILongPressGestureRecognizer to your collectionView in your viewcontroller's viewDidLoad()
method
class ViewController: UIViewController, UIGestureRecognizerDelegate {
override func viewDidLoad() {
super.viewDidLoad()
let lpgr = UILongPressGestureRecognizer(target: self, action: "handleLongPress:")
lpgr.minimumPressDuration = 0.5
lpgr.delaysTouchesBegan = true
lpgr.delegate = self
self.collectionView.addGestureRecognizer(lpgr)
}
The method to handle long press:
func handleLongPress(gestureReconizer: UILongPressGestureRecognizer) {
if gestureReconizer.state != UIGestureRecognizerState.Ended {
return
}
let p = gestureReconizer.locationInView(self.collectionView)
let indexPath = self.collectionView.indexPathForItemAtPoint(p)
if let index = indexPath {
var cell = self.collectionView.cellForItemAtIndexPath(index)
// do stuff with your cell, for example print the indexPath
println(index.row)
} else {
println("Could not find index path")
}
}
This code is based on the Objective-C version of this answer.
Thanks. Perfect!
– webmagnets
Mar 24 '15 at 21:45
My vertical scroll is not working for my collectionView now :(
– Qadir Hussain
Dec 11 '15 at 14:43
add a comment |
ztan answer's converted to swift 3 syntax and minor spelling update:
func handleLongPress(_ gestureRecognizer: UILongPressGestureRecognizer) {
if gestureRecognizer.state != UIGestureRecognizerState.ended {
return
}
let p = gestureRecognizer.location(in: collectionView)
let indexPath = collectionView.indexPathForItem(at: p)
if let index = indexPath {
var cell = collectionView.cellForItem(at: index)
// do stuff with your cell, for example print the indexPath
print(index.row)
} else {
print("Could not find index path")
}
}
add a comment |
The method handleLongProgress converted to swift 3 syntax works fine. I just want to add that the initialization of lpgr should be changed to:
let lpgr = UILongPressGestureRecognizer(target: self, action: #selector(handleLongPress(gestureReconizer:)))
add a comment |
One thing I found was that:
if gestureReconizer.state != UIGestureRecognizerState.Ended {
return
}
doesn't place pin until you release the longpress, which is OK, but I found
if gestureRecognizer.state == UIGestureRecognizerState.Began { }
around the whole function will prevent multiple pin placements while letting the pin appear as soon as the timer delay is satisfied.
Also, one typo above: Reconizer -> Recognizer
You are absolutely right, it feels more like the native map to have the pin placed while you're still pressing rather than waiting until the press is released to place the pin. There is full Swift code here: stackoverflow.com/a/29466391/1359088
– James Toomey
May 31 '16 at 3:18
add a comment |
ztan answer's converted to swift 4 syntax and minor spelling update:
@objc func handleLongPress(_ gestureRecognizer: UILongPressGestureRecognizer) {
guard gestureRecognizer.state != .ended else { return }
let point = gestureRecognizer.location(in: collectionView)
if let indexPath = collectionView.indexPathForItem(at: point),
let cell = collectionView.cellForItem(at: indexPath) {
// do stuff with your cell, for example print the indexPath
print(indexPath.row)
} else {
print("Could not find index path")
}
}
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f29241691%2fhow-do-i-use-uilongpressgesturerecognizer-with-a-uicollectionviewcell-in-swift%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
First you your view controller need to be UIGestureRecognizerDelegate
. Then add a UILongPressGestureRecognizer to your collectionView in your viewcontroller's viewDidLoad()
method
class ViewController: UIViewController, UIGestureRecognizerDelegate {
override func viewDidLoad() {
super.viewDidLoad()
let lpgr = UILongPressGestureRecognizer(target: self, action: "handleLongPress:")
lpgr.minimumPressDuration = 0.5
lpgr.delaysTouchesBegan = true
lpgr.delegate = self
self.collectionView.addGestureRecognizer(lpgr)
}
The method to handle long press:
func handleLongPress(gestureReconizer: UILongPressGestureRecognizer) {
if gestureReconizer.state != UIGestureRecognizerState.Ended {
return
}
let p = gestureReconizer.locationInView(self.collectionView)
let indexPath = self.collectionView.indexPathForItemAtPoint(p)
if let index = indexPath {
var cell = self.collectionView.cellForItemAtIndexPath(index)
// do stuff with your cell, for example print the indexPath
println(index.row)
} else {
println("Could not find index path")
}
}
This code is based on the Objective-C version of this answer.
Thanks. Perfect!
– webmagnets
Mar 24 '15 at 21:45
My vertical scroll is not working for my collectionView now :(
– Qadir Hussain
Dec 11 '15 at 14:43
add a comment |
First you your view controller need to be UIGestureRecognizerDelegate
. Then add a UILongPressGestureRecognizer to your collectionView in your viewcontroller's viewDidLoad()
method
class ViewController: UIViewController, UIGestureRecognizerDelegate {
override func viewDidLoad() {
super.viewDidLoad()
let lpgr = UILongPressGestureRecognizer(target: self, action: "handleLongPress:")
lpgr.minimumPressDuration = 0.5
lpgr.delaysTouchesBegan = true
lpgr.delegate = self
self.collectionView.addGestureRecognizer(lpgr)
}
The method to handle long press:
func handleLongPress(gestureReconizer: UILongPressGestureRecognizer) {
if gestureReconizer.state != UIGestureRecognizerState.Ended {
return
}
let p = gestureReconizer.locationInView(self.collectionView)
let indexPath = self.collectionView.indexPathForItemAtPoint(p)
if let index = indexPath {
var cell = self.collectionView.cellForItemAtIndexPath(index)
// do stuff with your cell, for example print the indexPath
println(index.row)
} else {
println("Could not find index path")
}
}
This code is based on the Objective-C version of this answer.
Thanks. Perfect!
– webmagnets
Mar 24 '15 at 21:45
My vertical scroll is not working for my collectionView now :(
– Qadir Hussain
Dec 11 '15 at 14:43
add a comment |
First you your view controller need to be UIGestureRecognizerDelegate
. Then add a UILongPressGestureRecognizer to your collectionView in your viewcontroller's viewDidLoad()
method
class ViewController: UIViewController, UIGestureRecognizerDelegate {
override func viewDidLoad() {
super.viewDidLoad()
let lpgr = UILongPressGestureRecognizer(target: self, action: "handleLongPress:")
lpgr.minimumPressDuration = 0.5
lpgr.delaysTouchesBegan = true
lpgr.delegate = self
self.collectionView.addGestureRecognizer(lpgr)
}
The method to handle long press:
func handleLongPress(gestureReconizer: UILongPressGestureRecognizer) {
if gestureReconizer.state != UIGestureRecognizerState.Ended {
return
}
let p = gestureReconizer.locationInView(self.collectionView)
let indexPath = self.collectionView.indexPathForItemAtPoint(p)
if let index = indexPath {
var cell = self.collectionView.cellForItemAtIndexPath(index)
// do stuff with your cell, for example print the indexPath
println(index.row)
} else {
println("Could not find index path")
}
}
This code is based on the Objective-C version of this answer.
First you your view controller need to be UIGestureRecognizerDelegate
. Then add a UILongPressGestureRecognizer to your collectionView in your viewcontroller's viewDidLoad()
method
class ViewController: UIViewController, UIGestureRecognizerDelegate {
override func viewDidLoad() {
super.viewDidLoad()
let lpgr = UILongPressGestureRecognizer(target: self, action: "handleLongPress:")
lpgr.minimumPressDuration = 0.5
lpgr.delaysTouchesBegan = true
lpgr.delegate = self
self.collectionView.addGestureRecognizer(lpgr)
}
The method to handle long press:
func handleLongPress(gestureReconizer: UILongPressGestureRecognizer) {
if gestureReconizer.state != UIGestureRecognizerState.Ended {
return
}
let p = gestureReconizer.locationInView(self.collectionView)
let indexPath = self.collectionView.indexPathForItemAtPoint(p)
if let index = indexPath {
var cell = self.collectionView.cellForItemAtIndexPath(index)
// do stuff with your cell, for example print the indexPath
println(index.row)
} else {
println("Could not find index path")
}
}
This code is based on the Objective-C version of this answer.
edited May 23 '17 at 11:46
Community♦
11
11
answered Mar 24 '15 at 21:11
ztanztan
6,33021738
6,33021738
Thanks. Perfect!
– webmagnets
Mar 24 '15 at 21:45
My vertical scroll is not working for my collectionView now :(
– Qadir Hussain
Dec 11 '15 at 14:43
add a comment |
Thanks. Perfect!
– webmagnets
Mar 24 '15 at 21:45
My vertical scroll is not working for my collectionView now :(
– Qadir Hussain
Dec 11 '15 at 14:43
Thanks. Perfect!
– webmagnets
Mar 24 '15 at 21:45
Thanks. Perfect!
– webmagnets
Mar 24 '15 at 21:45
My vertical scroll is not working for my collectionView now :(
– Qadir Hussain
Dec 11 '15 at 14:43
My vertical scroll is not working for my collectionView now :(
– Qadir Hussain
Dec 11 '15 at 14:43
add a comment |
ztan answer's converted to swift 3 syntax and minor spelling update:
func handleLongPress(_ gestureRecognizer: UILongPressGestureRecognizer) {
if gestureRecognizer.state != UIGestureRecognizerState.ended {
return
}
let p = gestureRecognizer.location(in: collectionView)
let indexPath = collectionView.indexPathForItem(at: p)
if let index = indexPath {
var cell = collectionView.cellForItem(at: index)
// do stuff with your cell, for example print the indexPath
print(index.row)
} else {
print("Could not find index path")
}
}
add a comment |
ztan answer's converted to swift 3 syntax and minor spelling update:
func handleLongPress(_ gestureRecognizer: UILongPressGestureRecognizer) {
if gestureRecognizer.state != UIGestureRecognizerState.ended {
return
}
let p = gestureRecognizer.location(in: collectionView)
let indexPath = collectionView.indexPathForItem(at: p)
if let index = indexPath {
var cell = collectionView.cellForItem(at: index)
// do stuff with your cell, for example print the indexPath
print(index.row)
} else {
print("Could not find index path")
}
}
add a comment |
ztan answer's converted to swift 3 syntax and minor spelling update:
func handleLongPress(_ gestureRecognizer: UILongPressGestureRecognizer) {
if gestureRecognizer.state != UIGestureRecognizerState.ended {
return
}
let p = gestureRecognizer.location(in: collectionView)
let indexPath = collectionView.indexPathForItem(at: p)
if let index = indexPath {
var cell = collectionView.cellForItem(at: index)
// do stuff with your cell, for example print the indexPath
print(index.row)
} else {
print("Could not find index path")
}
}
ztan answer's converted to swift 3 syntax and minor spelling update:
func handleLongPress(_ gestureRecognizer: UILongPressGestureRecognizer) {
if gestureRecognizer.state != UIGestureRecognizerState.ended {
return
}
let p = gestureRecognizer.location(in: collectionView)
let indexPath = collectionView.indexPathForItem(at: p)
if let index = indexPath {
var cell = collectionView.cellForItem(at: index)
// do stuff with your cell, for example print the indexPath
print(index.row)
} else {
print("Could not find index path")
}
}
edited Jul 13 '18 at 8:14
Charles Martin
163112
163112
answered Nov 11 '16 at 12:28
chr0xchr0x
375716
375716
add a comment |
add a comment |
The method handleLongProgress converted to swift 3 syntax works fine. I just want to add that the initialization of lpgr should be changed to:
let lpgr = UILongPressGestureRecognizer(target: self, action: #selector(handleLongPress(gestureReconizer:)))
add a comment |
The method handleLongProgress converted to swift 3 syntax works fine. I just want to add that the initialization of lpgr should be changed to:
let lpgr = UILongPressGestureRecognizer(target: self, action: #selector(handleLongPress(gestureReconizer:)))
add a comment |
The method handleLongProgress converted to swift 3 syntax works fine. I just want to add that the initialization of lpgr should be changed to:
let lpgr = UILongPressGestureRecognizer(target: self, action: #selector(handleLongPress(gestureReconizer:)))
The method handleLongProgress converted to swift 3 syntax works fine. I just want to add that the initialization of lpgr should be changed to:
let lpgr = UILongPressGestureRecognizer(target: self, action: #selector(handleLongPress(gestureReconizer:)))
answered Sep 17 '17 at 16:37


Fernando CardenasFernando Cardenas
627612
627612
add a comment |
add a comment |
One thing I found was that:
if gestureReconizer.state != UIGestureRecognizerState.Ended {
return
}
doesn't place pin until you release the longpress, which is OK, but I found
if gestureRecognizer.state == UIGestureRecognizerState.Began { }
around the whole function will prevent multiple pin placements while letting the pin appear as soon as the timer delay is satisfied.
Also, one typo above: Reconizer -> Recognizer
You are absolutely right, it feels more like the native map to have the pin placed while you're still pressing rather than waiting until the press is released to place the pin. There is full Swift code here: stackoverflow.com/a/29466391/1359088
– James Toomey
May 31 '16 at 3:18
add a comment |
One thing I found was that:
if gestureReconizer.state != UIGestureRecognizerState.Ended {
return
}
doesn't place pin until you release the longpress, which is OK, but I found
if gestureRecognizer.state == UIGestureRecognizerState.Began { }
around the whole function will prevent multiple pin placements while letting the pin appear as soon as the timer delay is satisfied.
Also, one typo above: Reconizer -> Recognizer
You are absolutely right, it feels more like the native map to have the pin placed while you're still pressing rather than waiting until the press is released to place the pin. There is full Swift code here: stackoverflow.com/a/29466391/1359088
– James Toomey
May 31 '16 at 3:18
add a comment |
One thing I found was that:
if gestureReconizer.state != UIGestureRecognizerState.Ended {
return
}
doesn't place pin until you release the longpress, which is OK, but I found
if gestureRecognizer.state == UIGestureRecognizerState.Began { }
around the whole function will prevent multiple pin placements while letting the pin appear as soon as the timer delay is satisfied.
Also, one typo above: Reconizer -> Recognizer
One thing I found was that:
if gestureReconizer.state != UIGestureRecognizerState.Ended {
return
}
doesn't place pin until you release the longpress, which is OK, but I found
if gestureRecognizer.state == UIGestureRecognizerState.Began { }
around the whole function will prevent multiple pin placements while letting the pin appear as soon as the timer delay is satisfied.
Also, one typo above: Reconizer -> Recognizer
edited Apr 13 '16 at 19:21


ayaio
57.9k20132185
57.9k20132185
answered Apr 13 '16 at 19:14
DPenDPen
32924
32924
You are absolutely right, it feels more like the native map to have the pin placed while you're still pressing rather than waiting until the press is released to place the pin. There is full Swift code here: stackoverflow.com/a/29466391/1359088
– James Toomey
May 31 '16 at 3:18
add a comment |
You are absolutely right, it feels more like the native map to have the pin placed while you're still pressing rather than waiting until the press is released to place the pin. There is full Swift code here: stackoverflow.com/a/29466391/1359088
– James Toomey
May 31 '16 at 3:18
You are absolutely right, it feels more like the native map to have the pin placed while you're still pressing rather than waiting until the press is released to place the pin. There is full Swift code here: stackoverflow.com/a/29466391/1359088
– James Toomey
May 31 '16 at 3:18
You are absolutely right, it feels more like the native map to have the pin placed while you're still pressing rather than waiting until the press is released to place the pin. There is full Swift code here: stackoverflow.com/a/29466391/1359088
– James Toomey
May 31 '16 at 3:18
add a comment |
ztan answer's converted to swift 4 syntax and minor spelling update:
@objc func handleLongPress(_ gestureRecognizer: UILongPressGestureRecognizer) {
guard gestureRecognizer.state != .ended else { return }
let point = gestureRecognizer.location(in: collectionView)
if let indexPath = collectionView.indexPathForItem(at: point),
let cell = collectionView.cellForItem(at: indexPath) {
// do stuff with your cell, for example print the indexPath
print(indexPath.row)
} else {
print("Could not find index path")
}
}
add a comment |
ztan answer's converted to swift 4 syntax and minor spelling update:
@objc func handleLongPress(_ gestureRecognizer: UILongPressGestureRecognizer) {
guard gestureRecognizer.state != .ended else { return }
let point = gestureRecognizer.location(in: collectionView)
if let indexPath = collectionView.indexPathForItem(at: point),
let cell = collectionView.cellForItem(at: indexPath) {
// do stuff with your cell, for example print the indexPath
print(indexPath.row)
} else {
print("Could not find index path")
}
}
add a comment |
ztan answer's converted to swift 4 syntax and minor spelling update:
@objc func handleLongPress(_ gestureRecognizer: UILongPressGestureRecognizer) {
guard gestureRecognizer.state != .ended else { return }
let point = gestureRecognizer.location(in: collectionView)
if let indexPath = collectionView.indexPathForItem(at: point),
let cell = collectionView.cellForItem(at: indexPath) {
// do stuff with your cell, for example print the indexPath
print(indexPath.row)
} else {
print("Could not find index path")
}
}
ztan answer's converted to swift 4 syntax and minor spelling update:
@objc func handleLongPress(_ gestureRecognizer: UILongPressGestureRecognizer) {
guard gestureRecognizer.state != .ended else { return }
let point = gestureRecognizer.location(in: collectionView)
if let indexPath = collectionView.indexPathForItem(at: point),
let cell = collectionView.cellForItem(at: indexPath) {
// do stuff with your cell, for example print the indexPath
print(indexPath.row)
} else {
print("Could not find index path")
}
}
edited Nov 21 '18 at 15:53
answered Nov 21 '18 at 15:31


ArtemArtem
687624
687624
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f29241691%2fhow-do-i-use-uilongpressgesturerecognizer-with-a-uicollectionviewcell-in-swift%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Show us what you've tried.
– rdelmar
Mar 24 '15 at 20:02
I have tried so many things it would be impossible to put all that in here. I have tried using the info at these links: stackoverflow.com/questions/23392485/… - tagwith.com/… - freshconsulting.com/create-drag-and-drop-uitableview-swift TONS of other pages.
– webmagnets
Mar 24 '15 at 20:05