ios13

MFMailComposeViewController behaves differently in iOS 13 simulator and device

懵懂的女人 提交于 2019-11-28 10:00:16
问题 I'm trying to display MFMailComposeViewController in an app. if MFMailComposeViewController.canSendMail() { let mailComposeViewController = MFMailComposeViewController() mailComposeViewController.navigationBar.tintColor = .white mailComposeViewController.mailComposeDelegate = self mailComposeViewController.setToRecipients(["support@gmail.com"]) mailComposeViewController.setSubject("Feedback") present(mailComposeViewController, animated: true) } else { print("This device is not configured to

iOS13 White Color issue with textColor of UIKit

六眼飞鱼酱① 提交于 2019-11-28 09:02:15
问题 Before iOS13 application Layout working as excepted. After latest dark theme and light theme update by apple in iOS13.1 , Their is so, many issue facing in existing application. Like UITextField placeHolder with whiteColor which are previously blackColor, UIDatePicker textColor with whiteColor which are previously blackColor. Can anyone help me with below DatePicker text color issue. which are invisible because whiteColor, TextColor should be blackColor. Any help appreciated. Thank you. 回答1:

Specifying UISegmentedControlNoSegment to UISegmentedControl's selectedSegmentIndex has no Effect on iOS 13

梦想与她 提交于 2019-11-28 08:32:30
问题 I am the maintainer of STAControls which subclasses various UIControl s, one of which is UISegmentedControl . Within that project's sample app, I have the following code (can be downloaded from the aforementioned link): - (void)textFieldDidEndEditing:(UITextField *)textField { NSInteger integer = [textField.text integerValue]; if (integer < 0 || integer >= self.segmentedControl.numberOfSegments) { this doesn't work self.segmentedControl.selectedSegmentIndex = UISegmentedControlNoSegment; }

NFCTagReaderSession has timeout of 20 seconds. How to increase it?

被刻印的时光 ゝ 提交于 2019-11-28 06:45:11
问题 I am trying to send APDU commands to NFC card that contains ISO7816 Tag I will open session: readerSession = NFCTagReaderSession(pollingOption: [.iso14443], delegate: self, queue: nil) readerSession?.begin() Once the tag is detected, session.connect(to: tags.first!) and start sending APDU commands one by one. detectedTag.sendCommand(apdu: apduCommand) { (response: Data, sw1: UInt8, sw2: UInt8, error: Error?) But after about 20 seconds NFCTagReaderSession is sending the error: Error Domain

UICollectionView and SwiftUI?

走远了吗. 提交于 2019-11-28 06:24:34
How to create grid of square items (for example like in iOS Photo Library) with SwiftUI? I tried this approach but it doesn't work: var body: some View { List(cellModels) { _ in Color.orange.frame(width: 100, height: 100) } } List still has UITableView style: One of the possible solutions is to wrap your UICollectionView into UIViewRepresentable . See Combining and Creating Views SwiftUI Tutorial, where they wrap the MKMapView as an example. By now there isn’t an equivalent of UICollectionView in the SwiftUI and there’s no plan for it yet. See a discussion under that tweet . To get more

addSubView SwiftUI View to UIKit UIView in Swift

孤街醉人 提交于 2019-11-28 05:25:01
问题 I have tried to addSubView a SwiftUI View to UIView. self.view.addSubview(contentView) Error: Cannot convert value of type 'ContentView' to expected argument type 'UIView' Kindly help me to implement this UI. import UIKit import SwiftUI class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. view.backgroundColor = UIColor.lightGray let contentView = ContentView() view.addSubview(contentView) // Error: Cannot

ios13 UIPopoverViewController showing UITableViewController - Safe Area problems / Missing parts of table

。_饼干妹妹 提交于 2019-11-28 04:53:39
问题 In the same theme as this post: iOS 13 - UIPopoverPresentationController sourceview content visible in the arrow I have a UITableViewController instantiated from the Storyboard. I'm presenting it in a UIPopoverViewController. Depending on orientation I either have a side missing or the top missing and the content of the _UITableViewHeaderFooterViewBackground scrolls 'through' the arrow. What's wrong: These are when it's on the top, but if it presents on the side then the whole side EDIT: I AM

iOS 13 UITextView converting UITextView to image is not working properly. Working fine in below iOS 12

安稳与你 提交于 2019-11-28 02:02:27
问题 How to solve this issue in iOS 13? I am taking screenshot of UITextView content size..Till iOS 12 everything is working fine. But issue with iOS 13 onwards it's not taking full screenshot it's cutting. Below is output picture for less than iOS 12 and after iOS 13. Less than iOS 12 Below is code I'm using to take screenshot of UITextView: UIGraphicsBeginImageContextWithOptions(textView.contentSize, textView.isOpaque, 0.0) let savedContentOffset: CGPoint = textView.contentOffset let savedFrame:

How can I change Status Bar Alpha in iOS 13?

◇◆丶佛笑我妖孽 提交于 2019-11-28 01:46:33
问题 I want to change the Status Bar Alpha in iOS 13. let statusBarWindow = UIApplication.shared.value(forKey: "statusBarWindow") as? UIWindow statusBarWindow?.alpha = 0.5 When I try this, the app crashes (Thread 1: signal SIGABRT). 回答1: The status bar is rendered by a system process (out of the app process) on iOS 13 so there is no way for an app to change this. (Source: speaking to UIKit engineers at the WWDC 2019 labs.) You can see this in the Apple Books app, which used to dim the status bar

Is it possible to opt-out of dark mode on iOS 13?

不打扰是莪最后的温柔 提交于 2019-11-28 00:56:50
A large part of my app consists of web views to provide functionality not yet available through native implementations. The web team has no plans to implement a dark theme for the website. As such, my app will look a bit half/half with Dark Mode support on iOS 13. Is it possible to opt out of Dark Mode support such that our app always shows light mode to match the website theme? According to Apple's "Implementing Dark Mode on iOS" Session ( https://developer.apple.com/videos/play/wwdc2019/214/ starting at 31:13) it is possible to set overrideUserInterfaceStyle to UIUserInterfaceStyleLight or