ios10

Strange white space at UITableView header when using UISearchController with UITableViewController on iOS 10

戏子无情 提交于 2019-12-06 06:11:12
问题 The white space only appears on iOS 10. 回答1: I ran into this problem as well. If you have the vertical scroll indicator enabled, you should be able to see that it's a UIScrollView 's inset issue. And seems like it only happens when you use a UITableViewcontroller as the searchResultsController of a UISearchController . And this extra space is visible at both the top and bottom of the view. This answer is not pretty, but I'm adding this in for now. if #available(iOS 10.0, *) {

Creating a MSSticker with a remote image

别来无恙 提交于 2019-12-06 06:05:26
I am trying to figure out way to create MSStickers with images that are hosted on the web. I can create MSStickers with local images, e.g.: NSString *imagePath = [[NSBundle mainBundle] pathForResource: @"image_name" ofType: @"png"]; NSURL *imageURL = [NSURL fileURLWithPath: urlString]; MSSticker *sticker = [[MSSticker alloc] initWithContentsOfFileURL: stickerURL localizedDescription: @"my-sticker" error: &err]; But I cannot do something like this: NSString *imageURLString = @"https://my-cdn/my-sticker.png"; NSURL *imageURL = [NSURL urlWithString: urlString]; MSSticker *sticker = [[MSSticker

In iOS10, is it possible to access Keychain from within a static library/framework, for unit testing

走远了吗. 提交于 2019-12-06 05:37:03
问题 Until Xcode 8/iOS 10, I was able to access the Keychain from within the unit tests of a static library. After upgrading, I get an error, see stack trace: failed: caught "NSInternalInconsistencyException", "Couldn't add the Keychain Item." ( 0 CoreFoundation 0x000000010b2a734b __exceptionPreprocess + 171 1 libobjc.A.dylib 0x000000010ad0821e objc_exception_throw + 48 2 CoreFoundation 0x000000010b2ab442 +[NSException raise:format:arguments:] + 98 3 Foundation 0x000000010a89eedd -

supportedInterfaceOrientations in iOS 10 and swift 2.3

北城余情 提交于 2019-12-06 05:31:19
问题 I am using Xcode 8 GM and have an old project that need updating for iOS 10. I have found that my current appstore build using version 2.2 of Swift is not supporting the desired interfaceorientation functionality when running on iOS 10 Simply put when I override supportedInterfaceOrientations() it never gets called when running on iOS 10. On previous versions it works fine. I can see that the signature has changed so that supportedInterfaceOrientations is now a var and not a method but this

How to send MSMessage in Messages Extension?

余生颓废 提交于 2019-12-06 04:43:01
问题 I want to implement an imessage app, however being new to the messages framework and iMessage apps being such a new thing there aren't many resources. So I am following the WWDC video and using Apples providing sample app for a guide. I have three views, the MessageViewController which handles pretty much all the functionality and then a CreateViewController and a DetailsViewController . I am simply trying to create an MSMessage from the CreateViewController and display in the

iOS 10 - Repeating notifications every “x” minutes

霸气de小男生 提交于 2019-12-06 03:55:59
问题 In iOS 10, how can I set local notifications to repeat in minutes starting from a particular date/time. For example, trigger local notification every 15 minutes starting from 11 AM on 8th September? Assume that, below, dateTimeReminder.date has 09/08 11 AM. let dateStart = self.dateTimeNotif.date let notifTrigger = UNCalendarNotificationTrigger.init(dateMatching: NSCalendar.current.dateComponents([.day, .month, .year, .hour, .minute], from: dateStart), repeats: true) let notificationRequest =

canOpenURL not working in ios 10 [duplicate]

不问归期 提交于 2019-12-06 02:07:53
问题 This question already has answers here : Google Maps URL scheme not working on iOS 9 (2 answers) Closed 3 years ago . The above code is always returning false if {(UIApplication.shared.canOpenURL(URL(string:"comgooglemaps://")!))} I guess this a problem found in iOS10. I am trying to open google maps app if there in one installed or try to open apple maps so wanted to use canOpenURL . are there any alternatives 回答1: Add this to your Info.plist and then try calling canOpenURL. <key

App icon is not showing in CallKit UI

余生颓废 提交于 2019-12-06 01:59:57
问题 I have configured my Provider Configuration for CallKit iOS. In which I have also set ' iconTemplateImageData ' for displaying app icon in CallKit UI. But app icon is not showing. It shows a white square box. Provider Configuration Code: CXProviderConfiguration *configuration = [[CXProviderConfiguration alloc] initWithLocalizedName:[NSString stringWithFormat:@"%@\n", _title]]; configuration.maximumCallGroups = 1; configuration.maximumCallsPerCallGroup = 1; UIImage *callkitIcon = [UIImage

OpenCV MatToUIImage causes memory leak

让人想犯罪 __ 提交于 2019-12-06 01:49:37
My project is working with openCV for iOS(2.4.9). And I found function MatToUIImage which will cause memory leaks, and it only occurs on iOS 10.X. After I updated this function(2.4.9) to latest(3.2.0) version everything got worked. The only difference is CGBitmapInfo . So can anyone tell me why? 2.4.9 UIImage* MatToUIImage(const cv::Mat& image) { NSData *data = [NSData dataWithBytes:image.data length:image.elemSize()*image.total()]; CGColorSpaceRef colorSpace; if (image.elemSize() == 1) { colorSpace = CGColorSpaceCreateDeviceGray(); } else { colorSpace = CGColorSpaceCreateDeviceRGB(); }

When is view frame size set in iOS10 SDK?

Deadly 提交于 2019-12-06 01:47:54
问题 For several years in Swift and ObjC I've used this technique to make a circular view: view.layer.cornerRadius = view.frame.size.width / 2 view.clipsToBounds = true When UILayoutConstraints in the Storyboard are fixed width / height there has been no problem putting this code in viewDidLoad, or in viewWillAppear. Built in iOS9.3SDK it runs fine in iOS10 etc. iOS10SDK shows framesize completely different to the fixed size in the Storyboard, even up to viewWillAppear, and in