Comments (2)
Hi,
I have coded like below its working fine for me.
/// Adding long-press gesture
let longGesture = UILongPressGestureRecognizer(target: self, action: #selector(self.longTap(_:)))
longGesture.minimumPressDuration = 0.15
statusImageView.isUserInteractionEnabled = true
statusImageView.addGestureRecognizer(longGesture)
let longGestureVideo = UILongPressGestureRecognizer(target: self, action: #selector(self.longTap(_:)))
longGestureVideo.minimumPressDuration = 0.15
videoView.isUserInteractionEnabled = true
videoView.addGestureRecognizer(longGestureVideo)
/// on long tap
@objc func longTap(_ sender: UITapGestureRecognizer){
if sender.state == .ended {
SPB.isPaused = false
if storyDict["storyType"] as! String == "video"
{
self.player.play()
}
}
else if sender.state == .began {
SPB.isPaused = true
if storyDict["storyType"] as! String == "video"
{
self.player.pause()
}
}
}
from segmentedprogressbar.
This would not be a valid requirement on this library, the library provides access to pausing and resuming functions that would be triggered by a gesture on your ViewController.
from segmentedprogressbar.
Related Issues (19)
- Can the individual segments be of different durations? HOT 3
- When app came from background to foreground
- how to multiple story work with this third party ???
- Rewind one story HOT 3
- Segment progressbar pause / resume not working
- Using with collection view
- is it available for swift 4.2
- Skip Story and start Progress bar with next story
- First 2 segmented bars start togheter
- how to restart it from beginning ?
- How to update a custom duration for segmentedprogress and to update progress as well? HOT 4
- Timer is running without sync with video duration and image
- How to fill the Progress bar if we are starting the index from 3 out of 5
- Cocoapods HOT 5
- Change number of segments? HOT 4
- Please specify the license. HOT 1
- Configure duration of each segment? HOT 4
- Remove particular segment HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from segmentedprogressbar.