ios11

How to correctly set UINavigationBar height in iOS 11

和自甴很熟 提交于 2020-01-12 09:19:11
问题 In my iOS 9+ app I use UINavigationBar in some of the UIViewController s "manually" (= placing them directly in the VC instead of using UINavigationViewController ). Setting a height for such a UINavigationBar using a simple contraint was no problem before. However in iOS 11 the bar itself still correctly uses the assigned size, but the content is not positioned correctly any more (is now alligned to the top). Any idea how to solve this? EDIT: I am pretty sure, that this is not a duplicate of

UISearchController in NavigationItem iOS 11 Apple way

心已入冬 提交于 2020-01-12 02:05:09
问题 In iOS 11 Apple presented new search bar, but yet in iOS 11.2.2 developer have push\pop animation bug when both view controllers have searchController. Apple demonstrate their vision in Files app. Do someone know how do it? edit#1 Question with broken animation. Broken UISearchBar animation embedded in NavigationItem 来源: https://stackoverflow.com/questions/48278159/uisearchcontroller-in-navigationitem-ios-11-apple-way

“Connect via network” wireless debugging not working Xcode 9

ⅰ亾dé卋堺 提交于 2020-01-11 17:42:29
问题 I am trying to run my iOS app via wifi network. But its not working as I expected. Connected Network sign is not displaying . I am using: macOS Sierra - 10.12.6 (in Mac mini) Xcode - 9.0 (9A235) iOS - 11.0 NOTE: Mac mini and iPhone both are connected to same wifi network . Already tried : Change another network Restart iPhone and Mac mini twice. Unpair Device and again pair device. Am I missing something? 回答1: I was having the same issue and performed the following steps to get things working

“Connect via network” wireless debugging not working Xcode 9

对着背影说爱祢 提交于 2020-01-11 17:41:43
问题 I am trying to run my iOS app via wifi network. But its not working as I expected. Connected Network sign is not displaying . I am using: macOS Sierra - 10.12.6 (in Mac mini) Xcode - 9.0 (9A235) iOS - 11.0 NOTE: Mac mini and iPhone both are connected to same wifi network . Already tried : Change another network Restart iPhone and Mac mini twice. Unpair Device and again pair device. Am I missing something? 回答1: I was having the same issue and performed the following steps to get things working

I can't include ' symbol to Regular Expressions

╄→尐↘猪︶ㄣ 提交于 2020-01-11 12:05:11
问题 I try to include ' symbol to Regular Expressions I use this function func matches(for regex: String, in text: String) -> [String] { do { let regex = try NSRegularExpression(pattern: regex) let results = regex.matches(in: text, range: NSRange(text.startIndex..., in: text)) return results.map { text.substring(with: Range($0.range, in: text)!) } } catch let error { print("invalid regex: \(error.localizedDescription)") return [] } } and this Regular Expressions let matched = matches(for: "^[‘]|[0

Swift 4 attributedString get typing attributes

本秂侑毒 提交于 2020-01-11 02:09:46
问题 I am trying to create AttributedString and add the attributes from typingAttributes(from textView) The problem is that .typingAttributes return [String, Any] and NSAttributedString(string:.. , attributes:[]) needs [NSAttributedStringKey: Any] My code: NSAttributedString(string: "test123", attributes: self.textView.typingAttributes) I don't want to create for in cycle to go through all keys and change them to NSAttributedStringKey 回答1: You can map the [String: Any] dictionary to a

Xcode 9: Provisioning profile is Xcode managed, but signing settings require a manually managed profile

淺唱寂寞╮ 提交于 2020-01-10 08:08:08
问题 I need to archive my app for submission to iTunes Connect. It was OK with Xcode 8.3.3: It's NOT OK with Xcode 9.0: When archiving, I get: Code Signing Error: Provisioning profile "XC iOS: *" is Xcode managed, but signing settings require a manually managed profile. Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.0' The two screenshots are taken from the same computer, same workspace. I can't use "Automatic" because it would change the provisioning

UITextView startInteractionWithLinkAtPoint crash iOS 11 only

感情迁移 提交于 2020-01-09 10:48:07
问题 So I experience crash in UItextview while user interacts with URL link there. All crash reports have iOS version 11 only. This looks like well-known bug in iOS 9, but there is no single report iOS versions lower than 11, and also in report I found interesting line: UITextGestureClusterLinkInteract smallDelayRecognizer: which came with iOS 11 (http://developer.limneos.net/?ios=11.0&framework=UIKit.framework&header=UITextGestureClusterLinkInteract.h). Anyway, for now I fixed it with @available

Simultaneous accesses to 0x1c0a7f0f8, but modification requires exclusive access error on Xcode 9 beta 4

社会主义新天地 提交于 2020-01-08 17:41:28
问题 my project uses both Objective-C and Swift code. When a user logs in, it calls a set of apis for user preference, I have a DataCoordinator.swift class which schedules the API operation and I make this calls from UserDetailViewController.m class to load user preferences. This use to work fine before I migrated my code to Swift 4 using Xcode 9 beta 4. Now when I login it crashes by giving me this error in my DataCoordinator class. Below is a sample of my DataCoordinator and Viewcontroller class

Simultaneous accesses to 0x1c0a7f0f8, but modification requires exclusive access error on Xcode 9 beta 4

巧了我就是萌 提交于 2020-01-08 17:40:10
问题 my project uses both Objective-C and Swift code. When a user logs in, it calls a set of apis for user preference, I have a DataCoordinator.swift class which schedules the API operation and I make this calls from UserDetailViewController.m class to load user preferences. This use to work fine before I migrated my code to Swift 4 using Xcode 9 beta 4. Now when I login it crashes by giving me this error in my DataCoordinator class. Below is a sample of my DataCoordinator and Viewcontroller class