ios11

Saving a screen recording with RPScreenRecorder start capture

戏子无情 提交于 2020-05-28 05:30:07
问题 I am attempting to use RPScreenRecorder.shared().startCapture to save a screen recording to firebase. I know how to save videos from AVCapture but cant figure out how to process The CMSampleBuffer to create a file to save to firebase. Please help I cant find documentation on this anywhere yet, here is the method call: let recorder = RPScreenRecorder.shared() if #available(iOS 11.0, *) { recorder.startCapture(handler: { (videoBuffer, bufferType, error) in print(videoBuffer) print(bufferType) }

App crash when presenting UIAlertController [duplicate]

别说谁变了你拦得住时间么 提交于 2020-05-15 08:39:07
问题 This question already has answers here : Swift UIAlertController -> ActionSheet iPad iOS8 Crashes (8 answers) Closed 2 years ago . My app's crashing when trying to present a UIAlertController . I have a UIViewController that gets presented modally, then on that presented view controller when a certain button is tapped I want to present a actionSheet alert. Somehow the app crashes when doing this and I cannot figure it out why. Here's the code: let alertController = UIAlertController(title:

How to save image taken from UIImagePickerController as HEIF file?

最后都变了- 提交于 2020-05-10 20:53:13
问题 How do I treat image taken from UIImagePickerController as HEIF file? Right now using camera as the source type, UIImagePickerControllerOriginalImage only provides me with UIImage. I want to send the image in HEIF format to the server. This is assuming imageExportPreset has been set to current. 回答1: Only thing I'd adjust with sverin's solution is to not use ctx.workingColorSpace, as you might be changing the space that the image is actually in. For example you might notice this if you reload

How to save image taken from UIImagePickerController as HEIF file?

倾然丶 夕夏残阳落幕 提交于 2020-05-10 20:52:07
问题 How do I treat image taken from UIImagePickerController as HEIF file? Right now using camera as the source type, UIImagePickerControllerOriginalImage only provides me with UIImage. I want to send the image in HEIF format to the server. This is assuming imageExportPreset has been set to current. 回答1: Only thing I'd adjust with sverin's solution is to not use ctx.workingColorSpace, as you might be changing the space that the image is actually in. For example you might notice this if you reload

How to save image taken from UIImagePickerController as HEIF file?

柔情痞子 提交于 2020-05-10 20:52:06
问题 How do I treat image taken from UIImagePickerController as HEIF file? Right now using camera as the source type, UIImagePickerControllerOriginalImage only provides me with UIImage. I want to send the image in HEIF format to the server. This is assuming imageExportPreset has been set to current. 回答1: Only thing I'd adjust with sverin's solution is to not use ctx.workingColorSpace, as you might be changing the space that the image is actually in. For example you might notice this if you reload

Wireless debugging icon not showing in my Xcode 9

让人想犯罪 __ 提交于 2020-05-09 03:05:07
问题 I just download Xcode 9 and was going through wireless debugging tutorials . I went through this link Wireless debugging but could not make out why my wireless debugging icon is not showing. My device is iPhone 6s updated to iOS 11. and the debugging icon is missing . Snaphot . The icon is missing. What I got from others tutorial, is the icon they are getting, which I am not getting. Like this in apple documents. . 回答1: Network icon is not showing because your device is not paired up to the

How to log a warning that shows up as a runtime issue in Xcode?

大憨熊 提交于 2020-05-07 17:59:25
问题 Xcode 8 or 9 started displaying runtime issues. You see a purple icon at the top of the window, and a list in Issue Navigator, next to buildtime issues like compilation warnings and errors. The runtime issues I've seen are created by the system libraries. Is there a way for my own application code to generate these? 回答1: In XCode 8.3 and earlier you can use set breakpoint into any method of UIKit class like setNeedsDisplay() like below. Also there is library in objective-c steipete class in

NSUnknownKeyException : was sent to an object that is not KVC-compliant for the “player” property

白昼怎懂夜的黑 提交于 2020-04-12 10:41:20
问题 I have updated my code to swift 4 in Xcode 9. Before that it was working fine. But now AVplayer is crashing at observers below is the code where it is crashing. addObserver(self, forKeyPath: "player.currentItem.duration", options: [.new, .initial], context: &playerViewControllerKVOContext) And the log is Terminating app due to uncaught exception 'NSUnknownKeyException',reason: '[ addObserver: forKeyPath:@"player.currentItem.duration" options:5 context:0x10ff74ac8] was sent to an object that

Is it possible to customize cluster image in iOS 11?

ε祈祈猫儿з 提交于 2020-03-24 01:01:10
问题 I'm using iOS 11 new APIs and I have been successful in making cluster appear. Now, I'm trying to change cluster image providing a custom image. Since I created this custom annotation view: class PlaceView: MKAnnotationView { override var annotation: MKAnnotation? { willSet { guard let place = newValue as? Place else {return} clusteringIdentifier = Place.type image = place.image } } I tried to add this line inside willSet block: cluster?.image = UIImage(named: "Cluster") but it didn't work.

Add a button to large title navigation bar

时间秒杀一切 提交于 2020-02-17 05:42:05
问题 Summary I'd like to add a button to a large title navigation bar like App Store's account button. Flow Desired: Button is visible only when large titles is enabled Allow transition from large titles to normal when user scrolls inside the view. Note: I use storyboard. 回答1: Found the answer on this Medium article by Tung Fam. private let imageView = UIImageView(image: UIImage(named: "image_name")) /// WARNING: Change these constants according to your project's design private struct Const { ///