ios10

Swift 3 | Unable to hide status bar on a ViewController

旧城冷巷雨未停 提交于 2020-03-06 00:59:29
问题 I want to show the status bar on portrait mode only, when I rotate the screen the status bar hides as intended but if I push / show a new View Controller the status bar appears again. I've tried the following without success: Setting View controller-based status bar appearance to NO in the info.plist file Using setNeedsStatusBarAppearanceUpdate() on self and on NavigationController Setting prefersStatusBarHidden: Bool to true Also tried UIApplication.shared.setStatusBarHidden(true, with:

UICollectionView cellForItemAt indexPath is skipping row indexes in iOS 10

萝らか妹 提交于 2020-02-01 06:20:31
问题 I have UICollectionView with horizontal scrolling and paging. When I scroll to next or previous page for the first time or change scrolling direction from left to right, value of indexPath.row in cellForItemAtIndexPath is changing by 3 not 1. Then it works properly. CollectionView works without problems in iOS 9. The problem occurs just in iOS 10. Thanks. 回答1: Problem was with new prefetching feature of UICollectionView. Disabling of prefetching solved my problem. if #available(iOS 10.0, *)

Speech Recognition Limits for iOS 10

跟風遠走 提交于 2020-01-30 22:02:41
问题 Does anyone know are there limits for the speech recognition in iOS 10 (per device or per app)? 回答1: Yes, there are limits, but I don't think Apple has issued many specific numbers. Apple released a supplementary video during WWDC 2016 which said the following: Now just a quick talk about some best practices. We're making speech recognition available for free to all apps but we do have some reasonable limits in place so that the service remains available to everyone. Individual devices may be

Google Sign In showing blank screen in iOS

有些话、适合烂在心里 提交于 2020-01-30 10:32:47
问题 I have implemented code as per the google SDK documentation line by line in my app, but still when I click on google sign in button app shifts to new view controller with webview with blank screen. Have tried multiple solution found here : GIDSignIn white screen on iOS 91. But no lucks with resolving the problem , have attached the screen shot for getting closer look about the screen. Following are the pods that I'm using, Running XCode 9.1, iOS 10.0 and later. Kindly request someone to help.

Is it possible to use core data (Xcode 8 and Swift 3.0) with both iOS 9 and 10 ?

巧了我就是萌 提交于 2020-01-24 12:48:33
问题 I want start new app in Swift 3 Xcode 8 and support iOS 8.4/9.x How to deal with Core Data ? 回答1: Yes, it is easily possible. Swift 3 is targeted to run on iOS v8+. You will only be able to use the subset of APIs supported on iOS v8.4 though. The best way to find out the answer to your question though is to create a test project that uses Core Data. You'll find that NSPersistentContainer creates an error. Why? It isn't available on the earlier OSes. Alternatively, create a test project with

Location permission dialog prompts lots of time in iOS 10

安稳与你 提交于 2020-01-23 02:28:11
问题 in iOS 10, sometimes when install the app, location permission prompts opens lots of time and hangs all app and not able to move further. here is my code that works before iOS 10 -(void)startLocationManager{ self.locationManager=[[CLLocationManager alloc]init]; self.locationManager.desiredAccuracy=kCLLocationAccuracyBest; self.locationManager.delegate=self; if ([self.locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)]) { [self.locationManager

How to handle push notification in background in ios 10?

萝らか妹 提交于 2020-01-22 19:34:22
问题 I am not handle push notification in background. For Handle push notification in background following below steps :- In Capabilities -> Enable Remote notification. In Capabilities -> Background Mode -> Enable Remote notifications. In didFinishLaunchingWithOptions give all permission for ios 10. For push notification used UNUserNotificationCenter . App In Foreground then push notification is working fine and below method call : userNotificationCenter:(UNUserNotificationCenter *)center

How to handle push notification in background in ios 10?

早过忘川 提交于 2020-01-22 19:34:10
问题 I am not handle push notification in background. For Handle push notification in background following below steps :- In Capabilities -> Enable Remote notification. In Capabilities -> Background Mode -> Enable Remote notifications. In didFinishLaunchingWithOptions give all permission for ios 10. For push notification used UNUserNotificationCenter . App In Foreground then push notification is working fine and below method call : userNotificationCenter:(UNUserNotificationCenter *)center

How can I repeat animation (using UIViewPropertyAnimator) certain number of times?

≯℡__Kan透↙ 提交于 2020-01-22 13:31:29
问题 I want to achieve pulsation effect for the button, and hence need to repeat the spring effect several number of times, the issue is that I can't find any information about what parameters to provide and how to do it let btnView = sayWordBtn.viewWithTag(0) btnView.transform = CGAffineTransform(scaleX: 0.7, y: 0.7) let mass: CGFloat = 2.0 // weight of the object let stiffness: CGFloat = 25.0 //elasticity let damping: CGFloat = 2*sqrt(mass*stiffness) // point where the system comes to rest in

How can I repeat animation (using UIViewPropertyAnimator) certain number of times?

强颜欢笑 提交于 2020-01-22 13:31:06
问题 I want to achieve pulsation effect for the button, and hence need to repeat the spring effect several number of times, the issue is that I can't find any information about what parameters to provide and how to do it let btnView = sayWordBtn.viewWithTag(0) btnView.transform = CGAffineTransform(scaleX: 0.7, y: 0.7) let mass: CGFloat = 2.0 // weight of the object let stiffness: CGFloat = 25.0 //elasticity let damping: CGFloat = 2*sqrt(mass*stiffness) // point where the system comes to rest in