ios13

iOS TabBar item title issue in iOS13

瘦欲@ 提交于 2020-05-25 05:23:47
问题 I am having issue in tabBar title for iOS13 on compiling from Xcode 11.It works perfect whle compiling from Xcode 10.Please find the screenshot for the issue and below is the code for customising the tabBar. The code is self.tabBar.isTranslucent = true self.tabBar.tintColor = UIColor.white UITabBarItem.appearance().badgeColor = Constant.Colors.colorFF1744 if #available(iOS 13, *) { let appearance = UITabBarAppearance.init() appearance.stackedLayoutAppearance.normal.titleTextAttributes =

iOS TabBar item title issue in iOS13

偶尔善良 提交于 2020-05-25 05:23:23
问题 I am having issue in tabBar title for iOS13 on compiling from Xcode 11.It works perfect whle compiling from Xcode 10.Please find the screenshot for the issue and below is the code for customising the tabBar. The code is self.tabBar.isTranslucent = true self.tabBar.tintColor = UIColor.white UITabBarItem.appearance().badgeColor = Constant.Colors.colorFF1744 if #available(iOS 13, *) { let appearance = UITabBarAppearance.init() appearance.stackedLayoutAppearance.normal.titleTextAttributes =

Change modalPresentationStyle on iOS13 on all UIViewController instances at once using method swizzling

安稳与你 提交于 2020-05-24 20:28:51
问题 [Q&A] Is it possible to change UIViewController.modalPresentationStyle value globally on iOS 13 so it behaves like it used to on iOS 12 (or earlier)? Why? In iOS 13 SDK the default value of UIViewController.modalPresentationStyle property has been changed from UIModalPresentationFullScreen to UIModalPresentationAutomatic which is, as far as I know, resolved to UIModalPresentationPageSheet on iOS devices or at least on iPhones. Since the project I've been working for several years has become

Xcode 10.3 failing to run on iOS 13 iPhone X - This iPhone X is running iOS 13.0 (17A577), which may not be supported by this version of Xcode

亡梦爱人 提交于 2020-05-23 11:44:24
问题 I updated to iOS 13 on my iPhone X and have Xcode 10.3 and am unable to run my project ton my phone. It gives me a notice of: Could not locate device support files and gives me this error: This iPhone X is running iOS 13.0 (17A577), which may not be supported by this version of Xcode I've looked everywhere, but since this release is new, how can I fix this? 回答1: You should upgrade your Xcode to the latest 11.0 in App Store, which contain support for iOS 13. 回答2: Your version of Xcode does not

Slicing Strings Swift

家住魔仙堡 提交于 2020-05-16 21:59:51
问题 I want to slice a very long string from one word to another. I want to get the substring between those words. For that, I use the following string extension: extension String { func slice(from: String, to: String) -> String? { guard let rangeFrom = range(of: from)?.upperBound else { return nil } guard let rangeTo = self[rangeFrom...].range(of: to)?.lowerBound else { return nil } return String(self[rangeFrom..<rangeTo]) } That works really good, but my raw-string contains a few of the "from"

SwiftUI - TabView with NavigationView generates gray area

廉价感情. 提交于 2020-05-16 21:58:35
问题 I have some problems with my tabbed view when I set isTranslucent to false in combination with a NavigationView . Does anyone know how to fix this? The problem is shown in the attached image. I need translucent set to false otherwise I can't get the dark color. 回答1: You can set backgroundColor. Don't set isTranslucent to false or it will create these artefacts you mentioned. UITabBar.appearance().backgroundColor = .black UINavigationBar.appearance().backgroundColor = .black It becomes much

SwiftUI - TabView with NavigationView generates gray area

孤人 提交于 2020-05-16 21:57:08
问题 I have some problems with my tabbed view when I set isTranslucent to false in combination with a NavigationView . Does anyone know how to fix this? The problem is shown in the attached image. I need translucent set to false otherwise I can't get the dark color. 回答1: You can set backgroundColor. Don't set isTranslucent to false or it will create these artefacts you mentioned. UITabBar.appearance().backgroundColor = .black UINavigationBar.appearance().backgroundColor = .black It becomes much

SwiftUI - ForEach with Stride

空扰寡人 提交于 2020-05-16 06:32:16
问题 Im trying to create a list of Hstack'd cards, That is to say, I want to create a scroll view of a series of rows. Each row would contain an HStack of two views displayed side by side, and initialized by some list data structure. struct MyHStackView: View { var myArray = [SomeStruct(1), SomeStruct(3), SomeStruct(4), SomeStruct(5), SomeStruct(6)] var body: some View { ScrollView(.vertical) { VStack { ForEach(0..<self.myArray.count) { index in HStack { SubView(myArray[index]) SubView(myArray

SwiftUI - ForEach with Stride

丶灬走出姿态 提交于 2020-05-16 06:31:15
问题 Im trying to create a list of Hstack'd cards, That is to say, I want to create a scroll view of a series of rows. Each row would contain an HStack of two views displayed side by side, and initialized by some list data structure. struct MyHStackView: View { var myArray = [SomeStruct(1), SomeStruct(3), SomeStruct(4), SomeStruct(5), SomeStruct(6)] var body: some View { ScrollView(.vertical) { VStack { ForEach(0..<self.myArray.count) { index in HStack { SubView(myArray[index]) SubView(myArray

SwiftUI List Background color [duplicate]

喜欢而已 提交于 2020-05-16 04:04:57
问题 This question already has answers here : SwiftUI List color background (7 answers) Closed 7 months ago . I am trying on setting a view background color to black with the following code struct RuleList: View {[![enter image description here][1]][1] private var presenter: ConfigurationPresenter? @ObservedObject private var viewModel: RowListViewModel init(presenter: ConfigurationPresenter?, viewModel: RowListViewModel) { self.presenter = presenter self.viewModel = viewModel } var body: some