ios10

Handling AutoLayout constraint animation differences in iOS 10?

谁说我不能喝 提交于 2019-12-03 09:27:33
I've noticed that in iOS 10 Beta 5 (about to try Beta 6), AutoLayout constraint animation behaves a bit differently. For example, this approach does not work the same as it did in previous iOS releases: [view addConstraints:@[constraints...]]; [view setNeedsUpdateConstraints]; [view layoutIfNeeded]; [UIView animateWithDuration:... { /* adjust constraint here... */ [view layoutIfNeeded]; // Only the adjusted constraints since previous layoutIfNeeded() call should animate change with duration. } completion:{ ... }]; ... In my testing, the constraints initially added with addConstraints() will

FB Login using Swift 3 not returning any values and not get back the user to the App after successful login

亡梦爱人 提交于 2019-12-03 09:17:01
问题 I'm using iOS 10 Swift 3 to integrate FB Login . I have followed all steps from Facebook documentation. Now the issue is, after successful login it doesn't returning any values and not get back the user to the app. Note: The same works perfectly in Swift 2 . 回答1: Hi I raised this issue to facebook developer support and the issue is that I have not implemented the correct delegate methods for iOS10. and you can find the correct delegate implementation here import UIKit import CoreData

Cordova iOS 10.3.1 breaks input file for videos

杀马特。学长 韩版系。学妹 提交于 2019-12-03 08:27:57
This is similar to this much older issue: HTML file input with multi selection in UIWebView not working for videos This is NOT a duplicate of this: iOS update to 10.3.1 breaks HTML input element I have tested this on my app that was working, on versions going back 45 days, it seems iOS 10.3.1 changed the file input and now there is the multiple video selection, without the "compressing" stage that occurred after selection and before switching out of the interface. Tested on iphone 6S. When access the the video file via javascript, there is no size or content (compare to image at the bottom,

Trying to send sms in iOS 10, Is “sms:” protocol broken?

五迷三道 提交于 2019-12-03 08:09:29
I have a click-to-send-sms button. Now I'm using this code when the button is clicked: if (platform == 'iOS') { if (version == 4 || version == 5 || version == 6 || version == 7) { link = 'sms:' + serviceNumber + ';body=' + body; } else { link = 'sms:' + serviceNumber + '&body=' + body; } } else { link = 'sms:' + serviceNumber + '?body=' + encodeURIComponent(body); } window.location.href = link; They are telling me that it isn't working anymore in iOS 10, nothing happens when the button is clicked. (the problem is not in the UA recognition, it goes into the "&body=...") Currently I don't have

Javascript call to Swift from UIWebView

本小妞迷上赌 提交于 2019-12-03 07:58:47
问题 I am trying to make a call from a javascript function in a UIWebView to Swift in iOS 10. I have setup a very basic project just to try and get this working, the code is below. import UIKit class ViewController: UIViewController, UIWebViewDelegate { @IBOutlet var webView: UIWebView! override func viewDidLoad() { super.viewDidLoad() let url = Bundle.main.url(forResource: "products", withExtension: "html") let request = NSURLRequest(url: url! as URL) webView.loadRequest(request as URLRequest) }

Keyboard extension loses height in iOS 10 when trying to size automatically in some cases

梦想与她 提交于 2019-12-03 07:51:29
You can download a sample project demonstrating the issue below here: https://github.com/DimaVartanian/keyboard-extension-height-bug When creating a keyboard extension and not specifying a concrete height for its components but instead anchoring them to the view/inputView so that in theory the system will determine their height based on environment and orientation, in some situations that height instead turns into 0 and the keyboard is crushed (with the exception of anything that has a concrete height such as a self sized label or button). This only seems to occur on iOS 10. On iOS 9, the

UISwitch setOn(:, animated:) does not work as document

岁酱吖の 提交于 2019-12-03 07:12:23
As Apple's document write, UISwitch 's function setOn(on: Bool, animated: Bool) does not send action. It works fine before iOS 10, but it will send action after I call it in iOS 10. I call it in "ValueChanged" event to force switch back, so I got this event action twice. is it a bug in iOS 10? DispatchQueue.main.async { sender.setOn(flag, animated: animated) } it works for me in Xcode 8. but call UISwitch.setOn(_:animated:) directly on main thread doesn't work. Update thanks to @codiction: UISwitch.setOn(_:animated:) can be called direclty on main thread, but can't be called directly in

NSKeyedArchiver does not work in Swift 3 ( XCode 8)

℡╲_俬逩灬. 提交于 2019-12-03 07:11:54
问题 I have migrated my project to Swift 3 and NSKeyedArchiver does not work. I actually have a runtime error when trying to decode object like this: let startDayTime = aDecoder.decodeObject(forKey: Key.startDayTime) as! Int It worked perfectly in Swift 2.2 in Xcode 7.3. Has anybody else faced such troubles? P.S. I have this error on both Simulator and Device. UPDATE: I solved this problem by using decodeInteger(forKey key: String) instead of decodeObject(forKey key: String) . By some reason

iOS 10 barTintColor animation

大兔子大兔子 提交于 2019-12-03 06:54:01
I've noticed a change in the way bar tint color animates in ios 10. I've created a sample project outlining the change: Github: ios10BarTintDemo Basically on ios 9 the barTintColor animates smoothly using [UIViewControllerTransitionCoordinator animateAlongsideTransition] but on ios 10 the animations are much less smooth and when popping a view controller doesn't animate at all, I've tried adding [self.navigationController.navigationBar layoutIfNeeded] as mentioned in some similar answers but this doesn't seem to have any effect when pushing/popping controllers. UPDATE I've tested in iOS 10.3

Ranging Beacons in iOS 10

那年仲夏 提交于 2019-12-03 06:49:30
In my app, I use Beacon Region Monitoring in CoreLocation. The app sets 2 proximityUUID as region (they have different id), and start ranging like following. #pragma mark - CLLocationManagerDelegate (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region { [self.locationManager requestStateForRegion:(CLBeaconRegion *)region]; } - (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region { [self.locationManager stopRangingBeaconsInRegion:(CLBeaconRegion *)region]; } - (void)locationManager:(CLLocationManager *)manager didRangeBeacons: