ios10

Safe area layout guides in xib files - iOS 10

末鹿安然 提交于 2019-12-18 10:08:33
问题 I started adapting my app for iPhone X and found an issue in Interface Builder. The safe area layout guides are supposed to be backwards compatible, according to official Apple videos. I found that it works just fine in storyboards. But in my XIB files, the safe area layout guides are not respected in iOS 10. They work fine for the new OS version, but the iOS 10 devices seem to simply assume the safe area distance as zero (ignoring the status bar size). Am I missing any required configuration

Swift 2 to 3 Migration dispatch_get_global_queue [duplicate]

五迷三道 提交于 2019-12-18 07:23:56
问题 This question already has answers here : How do I dispatch_sync, dispatch_async, dispatch_after, etc in Swift 3, Swift 4, and beyond? (6 answers) Closed 3 years ago . I have the following code that I've been trying to translate into swift 3 from swift 2. Here is what I have so far. DispatchQueue.async(group: DispatchQueue.global(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0),execute: { self.controllerDelegate?.codeToRun(progressWindowViewController: self) }) I am getting an error that says Cannot invoke

WKWebView vs UIWebView

我们两清 提交于 2019-12-18 07:12:05
问题 I've an app/project with deployment target version - iOS 10. I had used UIWebView , which is deprecated now and replaced by WKWebView . So, I want to replace UIWebView with WKWebView in my project also. It force me to either use UIWebView (with iOS 10) or change deployment target to iOS 11. I cannot change deployment target but as a middleware solution, I added code (programatically) support for both. I mean, if user's device OS is iOS 11 (or above) then use WKWebView else use UIWebView (for

iOS 10 custom navigation bar height

女生的网名这么多〃 提交于 2019-12-18 05:51:22
问题 I implemented custom navigation bar height, by subclassing it with following code class TMNavigationBar: UINavigationBar { ///The height you want your navigation bar to be of static let navigationBarHeight: CGFloat = 44.0 ///The difference between new height and default height static let heightIncrease:CGFloat = navigationBarHeight - 44 override init(frame: CGRect) { super.init(frame: frame) initialize() } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) initialize() }

How to programmatically open the WIFI settings in Objective-C on iOS 10

你离开我真会死。 提交于 2019-12-18 04:48:12
问题 The following code works fine on iOS 9, see this post. But it doesn't work on iOS 10. How to open WIFI settings programmatically on iOS 10 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=WIFI"]]; 回答1: The same exact code should work, but for iOS 10 you need to do some additional work by adding "prefs" to the URL Types: After selecting your target: Navigate to "Info" tab. After scrolling to bottom, you should see "URL Types" section. Add a new one (by clicking on

SKTextureAtlas no longer sharing textures in iOS 10

早过忘川 提交于 2019-12-18 04:16:39
问题 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:

Auto Layout constraint change does not animate

爷,独闯天下 提交于 2019-12-18 02:48:14
问题 I was learning the auto layout with animations from the tutorial http://weblog.invasivecode.com/post/42362079291/auto-layout-and-core-animation-auto-layout-was and things were working perfect. When I tried to use this concept in my application, trying to animate a settings screen(a UIView) from bottom to top,it works great when the settings screen is just an empty UIView, But in case I add a UILabel as a subview to this settings screen, the animation just vanishes. On removing this UILabel

Google Sign In not working on iOS 10 Beta 7 with Xcode 8 beta 6

倾然丶 夕夏残阳落幕 提交于 2019-12-18 02:43:08
问题 I have an app in the app store which worked perfectly fine till first few betas of iOS 10 (i am not exactly sure which one). It also works perfectly fine on iOS 9.3. However I am not testing on iOS 10 beta 7 and the google sign in is completely broken. I am using the latest version of GIDSignIn from cocoapods . Here's my code: [GIDSignIn sharedInstance].clientID = [[ParseFetcher sharedInstance] getRandomParseK]; [GIDSignIn sharedInstance].delegate = sharedInstance; [GIDSignIn sharedInstance]

Google Sign In not working on iOS 10 Beta 7 with Xcode 8 beta 6

落爺英雄遲暮 提交于 2019-12-18 02:42:35
问题 I have an app in the app store which worked perfectly fine till first few betas of iOS 10 (i am not exactly sure which one). It also works perfectly fine on iOS 9.3. However I am not testing on iOS 10 beta 7 and the google sign in is completely broken. I am using the latest version of GIDSignIn from cocoapods . Here's my code: [GIDSignIn sharedInstance].clientID = [[ParseFetcher sharedInstance] getRandomParseK]; [GIDSignIn sharedInstance].delegate = sharedInstance; [GIDSignIn sharedInstance]

HTML5 video/audio player on mobile Safari (iOS 7 & iOS 10) excludes cookies

强颜欢笑 提交于 2019-12-18 02:22:31
问题 I have noticed that the HTML5 video/audio player (AppleCoreMedia) on mobile Safari on iOS 7 excludes all cookies, even first-party cookies. Not even sessions cookies are included in the HTTP-header. This makes it impossible to relay on cookie authorization when playing a video clip in mobile Safari on iOS 7. All cookies are included correctly running iOS 6 but on iOS 7 no cookies are included in the HTTP-header of AppleCoreMedia. Can some one else confirm this issue on iOS 7? Steps to