ios11

iOS 11 AVPlayerViewController Disable Pinch / Drag Gesture

眉间皱痕 提交于 2021-01-08 02:30:34
问题 I have an AVPlayerViewController setup to play a video and them I am in-bedding the VC's view in a custom view controller. But if they user tries they can move the video around by 2 finger grabbing. How do I disable this? Thanks! See Below: 回答1: Try something like this before start playing video var positions = [Int]() for (idx, recognizer) in (playerVC.view.subviews[0].gestureRecognizers?.enumerated())! { if recognizer is UIPinchGestureRecognizer || recognizer is UIPanGestureRecognizer {

Image for Navigation Bar with Large Title iOS 11

◇◆丶佛笑我妖孽 提交于 2020-12-27 07:45:29
问题 AppStore app has an icon with an image on the right side of the NabBar with Large Title: Would really appreciate if anyone knows how to implement it or ideas on how to do it. BTW: Setting an image for UIButton inside of UIBarButtonItem won't work. Tried already. The button sticks to the top of the screen: 回答1: After several hours of coding, I finally managed to make it work . I also decided to write a detailed tutorial : link. Follow it in case you prefer very detailed instructions. Demo:

How to disable iOS 11 and iOS 12 Drag & Drop in WKWebView?

一笑奈何 提交于 2020-08-25 15:00:15
问题 Long-pressing images or links in a WKWebView on iOS 11 and 12 initiates a Drag & Drop session (the user can drag the image or the link). How can I disable that? 回答1: I did find a solution that involves method swizzling but it's also possible to disable drag and drop in a WKWebView without any swizzling. Note: See special notes for iOS 12.2+ below WKContentView — a private subview of WKWebView 's WKScrollView — has an interactions property, just like any other UIView in iOS 11+. That

How to disable iOS 11 and iOS 12 Drag & Drop in WKWebView?

青春壹個敷衍的年華 提交于 2020-08-25 14:52:47
问题 Long-pressing images or links in a WKWebView on iOS 11 and 12 initiates a Drag & Drop session (the user can drag the image or the link). How can I disable that? 回答1: I did find a solution that involves method swizzling but it's also possible to disable drag and drop in a WKWebView without any swizzling. Note: See special notes for iOS 12.2+ below WKContentView — a private subview of WKWebView 's WKScrollView — has an interactions property, just like any other UIView in iOS 11+. That

How to disable iOS 11 and iOS 12 Drag & Drop in WKWebView?

感情迁移 提交于 2020-08-25 14:52:40
问题 Long-pressing images or links in a WKWebView on iOS 11 and 12 initiates a Drag & Drop session (the user can drag the image or the link). How can I disable that? 回答1: I did find a solution that involves method swizzling but it's also possible to disable drag and drop in a WKWebView without any swizzling. Note: See special notes for iOS 12.2+ below WKContentView — a private subview of WKWebView 's WKScrollView — has an interactions property, just like any other UIView in iOS 11+. That

How to disable iOS 11 and iOS 12 Drag & Drop in WKWebView?

情到浓时终转凉″ 提交于 2020-08-25 14:50:11
问题 Long-pressing images or links in a WKWebView on iOS 11 and 12 initiates a Drag & Drop session (the user can drag the image or the link). How can I disable that? 回答1: I did find a solution that involves method swizzling but it's also possible to disable drag and drop in a WKWebView without any swizzling. Note: See special notes for iOS 12.2+ below WKContentView — a private subview of WKWebView 's WKScrollView — has an interactions property, just like any other UIView in iOS 11+. That

Why are UIScreen.bounds incorrect in iOS11

妖精的绣舞 提交于 2020-07-18 19:00:48
问题 Please don't mark as duplicate. Available threads haven't provided an answer. Behavior is iOS11 only. Updating a project from Xcode 8 to Xcode 9, using now iOS11 but still Swift 3, I have the following experience: print("UIScreen.main.bounds.width = \(UIScreen.main.bounds.width)") print("self.view.frame.width = \(self.view.frame.width)") let rect = CGRect( x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height * 0.25 ) prints: UIScreen.main.bounds.width = 414.0

iOS 11+ How to migrate existing Core Data to Shared App Group for use in extension?

左心房为你撑大大i 提交于 2020-07-14 04:06:06
问题 When I created an iOS 11 app using the core data template, it auto generated the following code in AppDelete.m. synthesize persistentContainer = _persistentContainer; - (NSPersistentContainer *)persistentContainer { // The persistent container for the application. This implementation creates and returns a container, having loaded the store for the application to it. @synchronized (self) { if (_persistentContainer == nil) { _persistentContainer = [[NSPersistentContainer alloc] initWithName:@

Localizable.strings - The data couldn’t be read because it isn’t in the correct format

大憨熊 提交于 2020-06-09 07:36:30
问题 If I copy something from textedit or web and paste it to localizable file it shows this compilation error. If I type those in localizable file it does not show any error. I am assuring you that I using the correct format and ';' in the file. "New" = "New"; "In Progress" = "In Progress"; "Waiting" = "Waiting"; "Closed" = "Closed"; 回答1: Use plutil from the Terminal: you have to run it for each version of the localizable file. E.g cd into your project root cd eb.lproj - you can replace this with