ios10

UIVisualEffectView in iOS 10

♀尐吖头ヾ 提交于 2019-12-08 22:49:25
问题 I am presenting a UIViewController that contains a UIVisualEffectView as follows: -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { [self performSegueWithIdentifier:@"segueBlur" sender:nil]; } -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if([segue.identifier isEqualToString:@"segueBlur"]) { ((UIViewController *)segue.destinationViewController).providesPresentationContextTransitionStyle = YES; (

iOS10 NSLog is limited to 1024 chars strings

こ雲淡風輕ζ 提交于 2019-12-08 22:05:43
问题 In iOS10 the NSlog are limited to 1024 characters has anybody know a workaround to print complete string. 回答1: try printf then instead of NSLog like, printf("%s", [string UTF8String]); It may works 回答2: I thinks this is a same question with [ NSLog on devices in iOS 10 / Xcode 8 seems to truncate? Why?, I will also post my answer here, in case you want to use printf instead. This is a temporary solution,since I think it's a bug. Just redefine all NSLOG to printf in a global header file.

UNNotificationServiceExtension: memory limit?

放肆的年华 提交于 2019-12-08 19:09:04
问题 I'm trying to implement UNNotificationServiceExtension, but my code seems to fail often, simply stating the Program ended with exit code: 0" I am trying to use the FMDB Sqlite3 module in the extension and it seems as though I may be running into memory limits inside the extension. Are there any documented limits for memory in these extensions? Are there any strategies to help me take them into account, or am I just going to have to accept that I can't put complex functionality into the

Can't Upload .ipa from Xcode 8, “The info.plist indicates a iOS app, but submitting a pkg or mpkg.”

最后都变了- 提交于 2019-12-08 15:09:36
问题 I am trying to submit my app. It is written in swift 3 and has an iOS 10 deployment target. So, I need to use Xcode 8. When I create an archive everything goes fine. I have even looked into the .ipa and everything seems fine. But, every time I get this error: The info.plist indicates a iOS app, but submitting a pkg or mpkg. No idea what's going on. I'm not using any frameworks. No cocoapods. Very simple app. Edit: Still no information on this. I have made a support request with Apple so we

QLPreviewController delegate method doesn't get called in iOS 10, but does get called if ran earlier than iOS 10

痞子三分冷 提交于 2019-12-08 14:15:50
问题 Here is my code. This may sound like redundant question but my scenario is different as I am not adding QLPreviewController as a subview but present as a controller. After downloading from dropbox, I present it like- self.pdfViewController = [[QLPreviewController alloc] init]; self.pdfViewController.delegate = self; self.pdfViewController.dataSource = self; [self presentViewController:self.pdfViewController animated:YES completion:nil]; and I also have QLPreviewControllerDataSource,

Core Image and memory leak, swift 3.0

拜拜、爱过 提交于 2019-12-08 12:23:03
问题 i have problem i try use filter at some images which have extension 3000x2000 , when i do it RAM upper and app have fatal error the "didReceiveMemoryWarning". func setFilters(images: [UIImage]) -> [UIImage] { let filter = CIFilter(name: "CIColorControls")! filter.setValue(2.0, forKey: kCIInputContrastKey) let context = CIContext(options: nil) var result = [UIImage]() for img in images { let newImage = autoreleasepool(invoking: { () -> UIImage in filter.setValue(CIImage(image: img)!, forKey:

iOS 10 NSMutableDictionary and NSMutableArray not working as before

僤鯓⒐⒋嵵緔 提交于 2019-12-08 11:42:45
问题 It seems with the release of iOS 10, a few things have broken. The major one for me has been the use of NSMutableDictionary and NSMutableArray. Both no longer seem to be able to parse a string of JSON and instead give out a nil while in pre iOS 10 they populated as expected. The only way around this I've found is to use NSDictionary and NSArray respectively and then use the init methods to cast back. For example: let json = "{ \"code\": \"abcde\", \"name\": \"JP Morgan\" }" json as!

Firebase Cloud Messaging iOS (compatibility with GCM server, topics)

孤街浪徒 提交于 2019-12-08 11:39:40
问题 I'm implementing an application on iOS which main purpose is to handle push notifications received from the server. Server is using GCM for messages delivery. If I decided to use the FCM framework on iOS (not even decided, just haven't found GCM framework for Swift 3, nor on Cocoapods), how much compatible will it be with the existing GCM - is it necessary to migrate it to FCM ? Is it possible to receive data messages (not notifications - the work as the should) while application is

How to make marker clustering with custom markers in GoogleMaps for iOS?

泄露秘密 提交于 2019-12-08 11:34:55
问题 I'm a beginner in iOS development. I added a GoogleMaps on my app, I can cluster the default markers of GoogleMaps but when I custom markers by an image from my computer, the custom markers can't cluster. Someone can help me to do it in Swift 3? I show you a part of my code : override func viewDidLoad() { mapView = GMSMapView(frame: view.frame) mapView.camera = GMSCameraPosition.camera(withLatitude: 48.898902, longitude: 2.282664, zoom: 12.0) mapView.mapType = .normal mapView.delegate = self

iOS 10 - Save pictures without internet - Swift 3.0 and Xcode 8.2

南笙酒味 提交于 2019-12-08 11:08:34
问题 I'm making an application (with Xcode 8.2.1, iOS 10 and swift 3.0) where the user can make thermal photos and normal photos (RGB). Then he can upload them to Amazon s3. But what happens if the user does not have internet at the moment of uploading an image or several images? How do I solve that problem? I can only think of two solutions, with coredata or sqlite, which one do you advise me? On the other hand, as I detect that the phone has no Internet connection. 回答1: You can, alternatively,