xcode9

How to collapse all methods in Xcode?

无人久伴 提交于 2019-12-17 21:24:03
问题 How to collapse all methods in a class in Xcode? Collapsing one by one is not an option anymore. 回答1: As of Xcode 4 it seems to have changed. command - alt - shift - left arrow will do the trick... To fold/unfold current methods or if structures use: Fold: command - alt - left arrow Unfold: command - alt - right arrow 回答2: Updates in Xcode 10 Xcode 10 has increased support for code folding, including: A new code folding ribbon showing all of the multi-line foldable blocks of code in the

Shrink large title when scrolling (not UITableViewController) iOS 11

走远了吗. 提交于 2019-12-17 19:13:33
问题 I got a View Controller embedded in a Navigation Controller with prefers large titles option set to true; inside the View Controller there’s a Scroll View. I want to make the nav bar shrink when scrolling. How could I archive this? XCode 9, Swift 4, iOS 11 回答1: I have not achieved that it works using a UIScrollView but I archived that it works with other ViewControllers using a UITableView as first view. If the tableView is not the first view, the large title fails to hide automatically. You

How can I delete derived data in Xcode 9? [duplicate]

倾然丶 夕夏残阳落幕 提交于 2019-12-17 18:51:16
问题 This question already has answers here : How can I delete derived data in Xcode 8? (12 answers) Closed 2 years ago . I have installed Xcode 9 today morning. It works fine but I want to understand the way to delete the derived data. Is there any specific way to remove it? 回答1: Open Xcode -> click Preferences... Now tap on Location tab then click on arrow same as below image 回答2: Open Xcode -> click on Xcode menu on top bar -> preferences -> location tab. Here you can see the path of derived

Xcode 9 “iPhone is busy: Preparing debugger support for iPhone”

*爱你&永不变心* 提交于 2019-12-17 10:22:11
问题 I'm looking for more information on this message. Xcode 9 seems to be hanging for a couple minutes already. How can I tell Xcode 9 to quickly recognize my previously used device updated to iOS 11? .Alex’s iPhone is busy: Preparing debugger support for .Alex’s iPhone Xcode will continue when .Alex’s iPhone is finished. 回答1: There are multiple solutions for this: Solution 1: Patiently wait for 10 to 15 minutes. Have a tea or roam around ;-) Solution 2: Disconnect device from the system. Restart

Module compiled with Swift 4.0 cannot be imported in Swift 4.0.1

断了今生、忘了曾经 提交于 2019-12-17 08:17:51
问题 However I have recompiled the framework using the same Xcode and it still gives me this error. Base SDK iOS 11.1 for both Swift Language Version Swift 4.0 for both Not using Pods/Carthage I hope someone might know 回答1: Update: For release versions of Xcode: This error (and similar errors involving Swift 4.1, 4.2, etc.) will occur when opening a project with Xcode 9.1, 9.2, 9.3, 9.4, 10, etc. that uses frameworks that were built with earlier Xcode tools. To fix the issue, update and rebuild

“Cannot convert value of type 'AVAudioPlayer.Type' to expected argument type”

时光总嘲笑我的痴心妄想 提交于 2019-12-14 03:04:16
问题 I'm having trouble with the function audioPlayerDidFinish playing. I have added the AVAudioPlayerDelegate to my view controller class and defined the function. When I call the function I get the error "Cannot convert value of type 'AVAudioPlayer.Type' to expected argument type" What am I doing wrong? Let me know if I need to add more code for you to see. func buttonPressed() { if currentSound == sound { currentSound = "None" activateBlankCircle() audioPlayer.stop() } else { currentSound =

Thread 1: signal SIGABRT in Xcode 9 [closed]

痴心易碎 提交于 2019-12-13 23:08:53
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago . SCREEN SHOT OF ERROR I have been trying to resolve this error for a couple of days. It is a Thread 1: signal SIGABRT error. Any help will be greatly appreciated. The link is a picture of the code. 回答1: SIGABRT happens when you call an outlet that is not there. No view is connected Duplicate might

How to test apps for iOS 11 on an older xCode version than 9

让人想犯罪 __ 提交于 2019-12-13 20:29:39
问题 After updating my xCode to be version 9.0, I'm facing an issue with the custom navigationBar, the status bar and navigation bar are colliding which was addressed here as a bug from xCode... My question is: how can build my project for iOS 11 too with an older version so I wouldn't have this issue? Thank you! 回答1: Originally modified from this answer. Follow these steps: Close/Quit Xcode 8 (or any of 8.. series) completely. Download Xcode 9 from Apple site (if you have done this already,

xcode9.0, in storyboard, when I toggle tableview style to grouped, xcode crashed

纵饮孤独 提交于 2019-12-13 12:58:21
问题 In xcode9.0, I add a tableview to storyboard, when I toggle tableview style to grouped, xcode crash. 回答1: Drag a new tableview to the top of the view Remove the default check of the Automatic RowHeight and Automatic Estimate Select Group Type OK 回答2: I update to Xcode9.0.1, this problem has been solved. 来源: https://stackoverflow.com/questions/46390437/xcode9-0-in-storyboard-when-i-toggle-tableview-style-to-grouped-xcode-crashed

Populate CollectionView and TableView using objects at different index of same array [closed]

邮差的信 提交于 2019-12-13 09:42:39
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago . I want to show Products of "group_type" == 1 in CollectionView and Products of "group_type" == 2 in TableView. I want to populate TableView in order where "group_title" will be Section Header and Products in Array "Products" as Rows. Below is my JSON. What Swift code do I need? "product_groups": [