ios

NSNetServiceBrowser did not search with error -72008 on iOS 14

情到浓时终转凉″ 提交于 2021-02-20 04:40:07
问题 The same error is also triggered setting up Multipeer Connectivity (which uses Bonjour). The code I was using for initiating Bonjour browsing and Multipeer Connectivity was modified from the Apple sample code and worked fine under iOS 13. 回答1: You need to add the following keys to the Info.plist: NSLocalNetworkUsageDescription and NSBonjourServices . E.g. <key>NSLocalNetworkUsageDescription</key> <string>Reason for using Bonjour that the user can understand</string> <key>NSBonjourServices<

Table view inside of a collection view

徘徊边缘 提交于 2021-02-20 04:33:07
问题 I have a collection view, and each collection view cell will have a table view which will have different data for each collection view cell. The collection view is done using a storyboard and works fine, but I can not seem to get a UITableView to work inside of it. The Collection view code is below and any help is appreciated. Ideally a technique that allows me to use storyboard to customise the tableview cell, and I am using Swift 4. extension StoryboardViewController:

Loading Data Asynchronously into UITableView

心不动则不痛 提交于 2021-02-20 04:24:50
问题 I am using xCode 7 beta and swift, and storing my data using Parse.com. In which method in the UITableViewController should I be asking for data from my database? I need to ensure it is all present by the point in the lifecycle of the controller at which the cells need to be presented. Is there anyway to guarantee this if I am loading data asynchronously? 回答1: viewDidLoad would be a good place for this but there might be a few second difference between displaying a blank tableView and when it

Loading Data Asynchronously into UITableView

≯℡__Kan透↙ 提交于 2021-02-20 04:24:18
问题 I am using xCode 7 beta and swift, and storing my data using Parse.com. In which method in the UITableViewController should I be asking for data from my database? I need to ensure it is all present by the point in the lifecycle of the controller at which the cells need to be presented. Is there anyway to guarantee this if I am loading data asynchronously? 回答1: viewDidLoad would be a good place for this but there might be a few second difference between displaying a blank tableView and when it

Upload a video to google using GTLRYouTubeService fails

北城余情 提交于 2021-02-20 03:59:49
问题 I'm trying to upload a video to youtube using GTLRYouTubeService from my iOS-app The login process is done via GIDSignIn and works so far. When the user logged in, I'm setting up the youtube-service: self.youTubeService = [GTLRYouTubeService new]; self.youTubeService.APIKey = API_KEY; self.youTubeService.authorizer = user.authentication.fetcherAuthorizer; Then I'm preparing the video object like this: GTLRYouTube_VideoStatus *status = [GTLRYouTube_VideoStatus object]; status.privacyStatus = @

Swift: Displaying the vertices label properly using SCNText

随声附和 提交于 2021-02-20 03:48:37
问题 I am trying to generate the face mesh from the AR face tutorial with proper vertices label using SCNText. I follow the online tutorial and have the following: enterextension EmojiBlingViewController: ARSCNViewDelegate { func renderer(_ renderer: SCNSceneRenderer,didUpdate node: SCNNode,for anchor: ARAnchor) { guard let faceAnchor = anchor as? ARFaceAnchor, let faceGeometry = node.geometry as? ARSCNFaceGeometry else { return } faceGeometry.update(from: faceAnchor.geometry) } func renderer(_

iOS - Streaming and receiving audio from a device to another ends in one only sending and the other only receiving

耗尽温柔 提交于 2021-02-20 03:44:18
问题 My app is basically a phone call over MultipeerConnectivity. Here is how I'm setting up the audio session: Note that recordingSession is of type AVAudioSession and captureSession is of type AVCaptureSession. func setupAVRecorder() { print("\(#file) > \(#function) > Entry") do { try recordingSession.setCategory(AVAudioSessionCategoryPlayAndRecord) try recordingSession.setMode(AVAudioSessionModeVoiceChat) try recordingSession.setPreferredSampleRate(44100.00) try recordingSession

Unable to Handle Local Notification when app has been terminated

主宰稳场 提交于 2021-02-20 02:48:34
问题 The app that I have made keeps track of Goals and Milestones(which belong to a goal) and reminds the user when they are about to reach the due date of a goal or a milestone through a UILocalNotification my app has been successful in handling local notifications when the app is in a background state and when the app is in the foreground. I am aware that if you want to handle local notifications when they are received when the app is terminated you are required to access the local notification

Unable to Handle Local Notification when app has been terminated

浪尽此生 提交于 2021-02-20 02:47:10
问题 The app that I have made keeps track of Goals and Milestones(which belong to a goal) and reminds the user when they are about to reach the due date of a goal or a milestone through a UILocalNotification my app has been successful in handling local notifications when the app is in a background state and when the app is in the foreground. I am aware that if you want to handle local notifications when they are received when the app is terminated you are required to access the local notification

iOS - How to fade in a UIView with a horizontal swipe/fade?

余生颓废 提交于 2021-02-20 02:26:52
问题 Is there a way in iOS to run a fade animation on a UIView (UILabel specifically) that will fade in with a swipe action (so if it paused half way, the left side is visible, right side invisible and middle some gradient between). I'm wondering if theres a Gradient mask I could use with the Alpha channel? Any ideas or code snippets for achieving this sort of reveal? Vertical or Horizontal. (Link to the same question but for Android for reference - Android - How to fade in a View with a