Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
method scanFloat was deprecated in iOS 13.0,
func scanFloat(_ result: UnsafeMutablePointer<Float>?) -> Bool
Scans for a float value, returning a found value by reference.
I can use for loop to solve it.
any other advice?
Please read the documentation.
There is an improved replacement
func scanFloat(representation: Scanner.NumberRepresentation = .decimal) -> Float?
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
I'm loading around 500 rows of data into a List. It was okay when I had 10 rows but now that I have 500 it's extremely slow. Is there anything I can do to help it's performance?
List {
SegmentedControl(selection: $feedType) {
ForEach(FeedType.allCases.identified(by: \.self)) { type in
Text(type.rawValue)
}
}
ForEach(store.stories) { story in
NavigationButton(destination: Text("")) {
StoryRow(story: story)
}
}
}
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I have a video inside my device but I want to extract the following details of the video(In flutter/dart)-
1.When the video was taken.
2.Duration of the video
3.Type of the Video
4.When the video was taken
Currently i am using Ff-mpeg plugin but it is taking too long time before it returns metadata information.
You may need to use FFMPEG as follows
import 'package:flutter_ffmpeg/flutter_ffmpeg.dart';
class VideoDetail {
final FlutterFFmpeg _flutterFFmpeg = new FlutterFFmpeg();
VideoDetail() {
_flutterFFmpeg
.getMediaInformation("<file path or uri>")
.then((info) => print(info));
}
}
Do not forget to add dependency
flutter_ffmpeg: ^0.1.1
For more information please visit
https://pub.dartlang.org/packages/flutter_ffmpeg
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I would like to open Google Maps app on iOS using the url scheme for showing directions with multiple stops.
The web url for testing is:
https://google.com/maps/dir//49.54643774,22.28223445/49.54679476,22.28170513/49.54726735,22.28154318/49.54760869,22.28156607/49.54820312,22.2815506/49.54856556,22.28146425/49.54907329,22.28133231/49.54989807,22.28207924/49.55017454,22.2824851/49.55064392,22.28306989/49.5508548,22.28325003/49.55143275,22.28381447/49.55169439,22.28410868/49.5520271,22.28443534
I tried many configurations of the app scheme using comgooglemaps:// without success.
You can read the Google Maps documentation for opening the app.
To simplify it, this is the format you need to follow:
comgooglemaps://?saddr=Google,+1600+Amphitheatre+Parkway,+Mountain+View,+CA+94043&daddr=Google+Inc,+345+Spear+Street,+San+Francisco,+CA¢er=37.422185,-122.083898&zoom=10
in swift you would do something like this, take note of the callback option, you can choose to not have it if you don't want to return to your app:
let testURL = URL(string: "comgooglemaps-x-callback://")!
if UIApplication.shared.canOpenURL(testURL) {
let directionsRequest = "comgooglemaps-x-callback://" +
"?daddr=John+F.+Kennedy+International+Airport,+Van+Wyck+Expressway,+Jamaica,+New+York" +
"&x-success=sourceapp://?resume=true&x-source=AirApp"
let directionsURL = URL(string: directionsRequest)!
UIApplication.shared.openURL(directionsURL)
} else {
NSLog("Can't use comgooglemaps-x-callback:// on this device.")
}
Edit: To use coordinates, use it this way:
comgooglemaps://?saddr=52.3668563,4.8890813&daddr=52.357516,4.902319&zoom=10
Edit 2: For for more points on the map append coordinate using +to:Latitude,Longtitude to the daddr parameter
comgooglemaps://?saddr=52.3668563,4.8890813&daddr=52.357516,4.902319+to:52.357786,4.891913&zoom=10
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Just as the title says, do you know any alternative of AGPushNote for Swift ?
In order to better understand what I was searching for when I found out on SO about this, I would like to .. "detect" when push notifications are incoming and app is active so I can prevent the notifications from showing up and do some of my own stuff instead.
I just published a pod that does exactly that.
Example usage:
import CWNotificationBanner
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
let message = Message(text: "You have an alert")
NotificationBanner.showMessage(message)
let message = Message("You have an alert", displayDuration: 2)
NotificationBanner.showMessage(message)
}
override func viewWillDisappear() {
super.viewWillDisappear()
NotificationBanner.cancelMessage(message, animated: false)
NotificationBanner.cancelAllMessages()
}
Feel free to check out & contribute if you like!