xcode

Xcode 11 beta swift ui preview not showing

不羁的心 提交于 2020-12-28 04:31:37
问题 Just playing with Swift UI basic app and the preview canvas is not showing even though I'm in canvas mode. App runs, and I have this little snippet what am I missing? #if DEBUG struct ContentView_Previews : PreviewProvider { static var previews: some View { ContentView() } } #endif 回答1: To preview and interact with views from the canvas in Xcode, ensure your Mac is running on Catalina MacOS . https://developer.apple.com/tutorials/swiftui/creating-and-combining-views Please check apple

Image for Navigation Bar with Large Title iOS 11

◇◆丶佛笑我妖孽 提交于 2020-12-27 07:45:29
问题 AppStore app has an icon with an image on the right side of the NabBar with Large Title: Would really appreciate if anyone knows how to implement it or ideas on how to do it. BTW: Setting an image for UIButton inside of UIBarButtonItem won't work. Tried already. The button sticks to the top of the screen: 回答1: After several hours of coding, I finally managed to make it work . I also decided to write a detailed tutorial : link. Follow it in case you prefer very detailed instructions. Demo:

AVMutableComposition rotates recorded video

爷,独闯天下 提交于 2020-12-27 06:18:22
问题 I am building an iOS app using the AVFoundation Framework, objective-C and Xcode 7.1. What i am doing is get a recorded video, add a text layer and export. My problem is that the exported video is on landscape when i recorded on portrait! I 've been struggled for hours and can't solve it. I found similar questions but none of the answers helped me. Here is my code: AVURLAsset* videoAsset = [[AVURLAsset alloc]initWithURL:self.videoURL options:nil]; AVMutableComposition* mixComposition =

Xcode 12 Storyboard Zoom Window

大兔子大兔子 提交于 2020-12-26 07:46:20
问题 What is the name of this new zoom window in Xcode 12? I'm trying to hide it. 回答1: That is the minimap , and you can hide it from the little popup menu at the top right of the canvas. 来源: https://stackoverflow.com/questions/64081523/xcode-12-storyboard-zoom-window

Storyboard is not showing custom color hex code in XCode 12.0.1

孤者浪人 提交于 2020-12-26 07:16:12
问题 After updating to the latest Xcode, into storyboard I am not able to see actual custom color hex code. It is showing a white(FFFFFF) color hex code all time. Can someone please help me with this? Please check the below screenshot. 回答1: I have noticed this same problem since the latest XCode Version 12.0.1. A workaround that works for me is to Click on the custom color to bring up the color chooser. The color chooser is the wrong color, but tap on any other color in the color chooser. Tap Cmd

Github Actions: xcodebuild fails due to server fingerprint

人走茶凉 提交于 2020-12-26 06:33:52
问题 I am trying to build a macOS app with Github Actions. This already worked very well, until I migrated my dependencies to Swift Package Manager. Now I am getting the following error while building my app: xcodebuild: error: Could not resolve package dependencies: The server SSH fingerprint failed to verify. I have a private GitHub repository as a dependeny in my application added as a Swift Package using a ssh location. Therefore I need to add my ssh key for the dependency in the Set up ssh

Github Actions: xcodebuild fails due to server fingerprint

不羁岁月 提交于 2020-12-26 06:28:01
问题 I am trying to build a macOS app with Github Actions. This already worked very well, until I migrated my dependencies to Swift Package Manager. Now I am getting the following error while building my app: xcodebuild: error: Could not resolve package dependencies: The server SSH fingerprint failed to verify. I have a private GitHub repository as a dependeny in my application added as a Swift Package using a ssh location. Therefore I need to add my ssh key for the dependency in the Set up ssh

Unity application doesn't run on iOS due to Shader warning and Compiler failed with XPC_ERROR_CONNECTION_INTERRUPTED

岁酱吖の 提交于 2020-12-25 18:15:57
问题 I am new to unity and trying to get a VERY simple 2D game to work through Xcode . Everything seems to be working and the build is successful. But, it is printing the errors below - 2019-10-23 22:27:16.559673-0600 test4[19600:5249871] Built from '2019.2/staging' branch, Version '2019.2.9f1 (ebce4d76e6e8)', Build type 'Release', Scripting Backend 'il2cpp' 2019-10-23 22:27:16.569618-0600 test4[19600:5249871] -> registered mono modules 0x102e52fd0 -> applicationDidFinishLaunching() 2019-10-23 22

Unity application doesn't run on iOS due to Shader warning and Compiler failed with XPC_ERROR_CONNECTION_INTERRUPTED

爷,独闯天下 提交于 2020-12-25 18:11:42
问题 I am new to unity and trying to get a VERY simple 2D game to work through Xcode . Everything seems to be working and the build is successful. But, it is printing the errors below - 2019-10-23 22:27:16.559673-0600 test4[19600:5249871] Built from '2019.2/staging' branch, Version '2019.2.9f1 (ebce4d76e6e8)', Build type 'Release', Scripting Backend 'il2cpp' 2019-10-23 22:27:16.569618-0600 test4[19600:5249871] -> registered mono modules 0x102e52fd0 -> applicationDidFinishLaunching() 2019-10-23 22

Multiple Section in UICollectionView

冷暖自知 提交于 2020-12-25 05:23:50
问题 I was building an iOS app for my hospital using collection view. However, I need to use multiple sections for the specialist clinic depends on the purpose. I already completed the code if it's just for 1 section. when I try to make it 2 sections, it always returns a nil value. please check my code below public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: