ios10

Remove top line from TabBar

拥有回忆 提交于 2019-11-29 06:06:43
On iOS 10 this code doesn't work in order to remove the tabBar shadow line: [[UITabBar appearance] setShadowImage:[[UIImage alloc] init]]; Somebody knows, what must I do to remove it? On iOS 9.3 with this two lines the line is removed, but iOS 10 ignores setShadowImage command. Just the 2 lines removes the topline tabBar.shadowImage = UIImage() tabBar.backgroundImage = UIImage() Just try to bellow code for iOS 10 :- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. [

How to handle UserNotifications Actions in iOS 10

不羁的心 提交于 2019-11-29 04:36:07
问题 So I am able to schedule notifications like so; //iOS 10 Notification if #available(iOS 10.0, *) { var displayDate: String { let dateFormatter = DateFormatter() dateFormatter.dateStyle = DateFormatter.Style.full return dateFormatter.string(from: datePicker.date as Date) } let notif = UNMutableNotificationContent() notif.title = "I am a Reminder" notif.subtitle = "\(displayDate)" notif.body = "Here's the body of the notification" notif.sound = UNNotificationSound.default() notif

SKTextureAtlas no longer sharing textures in iOS 10

雨燕双飞 提交于 2019-11-29 04:34:41
It seems that when pulling textures from a texture atlas, I am now generating new textures instead of using the same texture across different sprites with iOS 10. On iOS 9, this works as expected. Is anyone else experiencing this issue? Perhaps there is a step I missed that is now a part of iOS 10. Notes: I created a sample project and created a new atlas, then just dragged spaceship in @1x, I have also tried preloading, and that did nothing as well. Code: let atlas = SKTexturAtlas(named:"Sprites") var texture = atlas.textureNamed("Spaceship") print("\(Unmanaged.passUnretained(texture)),\

Today Extension: How to work with display mode?

橙三吉。 提交于 2019-11-29 04:09:46
Widgets now include the concept of display mode (represented by NCWidgetDisplayMode ), which lets you describe how much content is available and allows users to choose a compact or expanded view. How to expand widget in ios 10.0? It doesn't work as in ios 9. Vladius001 Ok, i found right solution here . 1) Set the display mode to NCWidgetDisplayMode.expanded first in viewDidLoad : override func viewDidLoad() { super.viewDidLoad() self.extensionContext?.widgetLargestAvailableDisplayMode = NCWidgetDisplayMode.expanded } 2) Implement new protocol method: func widgetActiveDisplayModeDidChange(_

Determine user's “Temperature Unit” setting on iOS 10 (Celsius / Fahrenheit)

邮差的信 提交于 2019-11-29 04:04:39
iOS 10 adds the ability for the user to set their "Temperature Unit" choice under Settings > General > Language & Region > Temperature Unit. How can my app programmatically determine this setting so it can display the right temperature unit? I poured through NSLocale.h and didn't see anything relevant. (Before iOS 10, it was sufficient to test if the locale used metric and assume that metric users want to use Celsius. This is no longer the case.) There is this article by Alexandre Colucci that I found: http://blog.timac.org/?tag=nslocaletemperatureunit First, expose the NSLocaleTemperatureUnit

How to pass access token to Alamofire?

此生再无相见时 提交于 2019-11-29 02:59:27
问题 I am trying to pass access token in Alamofire but getting confuse in various methods around web. Below are methods which we need to use. let todosEndpoint: String = "https:url......." let headers = [ "Authorization": "Bearer \(token!)", "Content-Type": "application/X-Access-Token" ] let Auth_header = [ "Authorization" : tokenString! ] Alamofire.request(todosEndpoint, method: .get, parameters: nil, encoding: JSONEncoding.default, headers: Auth_header) .responseJSON { response in print(

exc_bad_access in Facebook sdk login Xcode 8 beta

瘦欲@ 提交于 2019-11-29 02:50:01
问题 recently I started adding my application IOS 10 features while I encountered a weird bug: When authenticating with facebook SDK via browser as soon as I click the confirmation button in facebook itself at the embeded browser, the app crashes. Unfortunately this bug is not informative, the console doesn't tell me anything about it and there is not call stack to see where this exception was occurred. Two points for demonstrating this bug cause: 1. This bug doesn't occur if the login is via

IOS HTML disable double tap to zoom

跟風遠走 提交于 2019-11-29 02:41:02
问题 I am designing a website primarily focused on data entry. In one of my forms I have buttons to increment and decrement the number value in a form field quickly. I was using <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> to disable the zoom which appeared to work using the Firefox app for IOS. However, when another user tested it with Safari, clicking on the button too fast resulted in zooming in on the page,

ios speech recognition Error Domain=kAFAssistantErrorDomain Code=216 “(null)”

前提是你 提交于 2019-11-29 01:00:21
问题 Basically I am learning ios speech recognition module following this tutorial: https://medium.com/ios-os-x-development/speech-recognition-with-swift-in-ios-10-50d5f4e59c48 But when I test it on my iphone6, I always got this error: Error Domain=kAFAssistantErrorDomain Code=216 "(null)" I searched it on the internet, but find very rare info about this. Here is my code: // // ViewController.swift // speech_sample // // Created by Peizheng Ma on 6/22/17. // Copyright © 2017 Peizheng Ma. All

Swift2.3 code for Beacon detection

混江龙づ霸主 提交于 2019-11-29 00:45:19
We are in advanced stages of developing a Swift2.2 app and hence have decided to migrate to 2.3 in the interim and do the full Swift 3 migration later. However we are unable to get beacon detection working post conversion to Swift 2.3. The method "didRangeBeacons" keeps returning an empty array. The same code was working in Swift 2.2 so we know we have all the permissions etc in place. Also if we open the "Locate" app on the same ipad then our app also starts returning data in "didRangeBeacons". Have tried various versions of the apps out there and all Swift2.3 apps are behaving the same way.