swift5

TintColor not changing for UIBarButtonItem for .normal stage in case of iOS 13.2

岁酱吖の 提交于 2021-01-28 03:42:24
问题 I have tried the almost max solution and it did not help, selected state color is applying but for a normal state, it's not applying. This issue I am facing specifically in iOS13.2 only. tabBarItem.setTitleTextAttributes([NSAttributedString.Key.font: tabFont, NSAttributedString.Key.foregroundColor: UIColor.yellow], for: .selected) tabBarItem.setTitleTextAttributes([NSAttributedString.Key.font: tabFont, NSAttributedString.Key.foregroundColor: UIColor.white], for: UIControl.State.normal) I have

Carthage build failed Xcode 12 12A7209 building

半城伤御伤魂 提交于 2021-01-13 08:53:51
问题 Carthage File contents: github "SwiftyJSON/SwiftyJSON" Error: Build Failed Task failed with exit code 1: /usr/bin/xcrun lipo -create /Users/samrezikram/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0_12A7209/SwiftyJSON/5.0.0/Build/Intermediates.noindex/ArchiveIntermediates/SwiftyJSON\ tvOS/IntermediateBuildFilesPath/UninstalledProducts/appletvos/SwiftyJSON.framework/SwiftyJSON /Users/samrezikram/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0_12A7209/SwiftyJSON/5.0.0/Build

SwiftUI Position Google and Facebook login buttons

此生再无相见时 提交于 2021-01-07 04:13:23
问题 I am using Firebase Auth and I have two buttons. One for Google and one for Facebook. I'm trying to set the height and width via .frame() but they are not responding properly. Moreover, the Google sign in button wont appear in the middle but on the right of the screen. I tried to put them inside a VStack but still the same thing. VStack(alignment: .center) { FacebookLoginButtonView() .frame(width: 100, height: 28) // duhet 28 fiks .border(Color.red) GoogleLoginButtonView() .frame(width: 100,

Adding custom view into NavigationBar not working?

六月ゝ 毕业季﹏ 提交于 2021-01-07 01:16:29
问题 I am trying to add custom view to NavigationBar and result not working correct. public let statusBarHeight: CGFloat = { var heightToReturn: CGFloat = 0.0 for window in UIApplication.shared.windows { if let height = window.windowScene?.statusBarManager?.statusBarFrame.height, height > heightToReturn { heightToReturn = height } } return heightToReturn }() override func viewDidLoad() { super.viewDidLoad() // self.navigationController?.navigationBar.isHidden = true // Do any additional setup

iOS Xcode 12.0 Swift 5 'AppDelegate' is annotated with @main and must provide a main static function of type () -> Void or () throws -> Void

删除回忆录丶 提交于 2020-12-23 01:51:45
问题 In my Xcode 12.0 using Swift 5 and Catalina 10.15.5: When I tick Mac as deployable target (Apple Project Catalyst), and click Runs, it gives me an error showing: 'AppDelegate' is annotated with @main and must provide a main static function of type () -> Void or () throws -> Void. Can't find anything on Internet... I have checked my codes and nothing's wrong and it can be run on iOS devices and simulators. Debug log is empty (duhh...) Anyone facing this issue? 回答1: Change @main to

iOS Xcode 12.0 Swift 5 'AppDelegate' is annotated with @main and must provide a main static function of type () -> Void or () throws -> Void

十年热恋 提交于 2020-12-23 01:51:41
问题 In my Xcode 12.0 using Swift 5 and Catalina 10.15.5: When I tick Mac as deployable target (Apple Project Catalyst), and click Runs, it gives me an error showing: 'AppDelegate' is annotated with @main and must provide a main static function of type () -> Void or () throws -> Void. Can't find anything on Internet... I have checked my codes and nothing's wrong and it can be run on iOS devices and simulators. Debug log is empty (duhh...) Anyone facing this issue? 回答1: Change @main to