xcode7.3

For-In Loops multiple conditions

ε祈祈猫儿з 提交于 2019-12-01 17:18:08
With the new update to Xcode 7.3, a lot of issues appeared related with the new version of Swift 3. One of them says "C-style for statement is deprecated and will be removed in a future version of Swift" (this appears in traditional for statements). One of this loops has more than one condition: for i = 0; i < 5 && i < products.count; i += 1 { } My question is, is there any elegant way (not use break ) to include this double condition in a for-in loop of Swift: for i in 0 ..< 5 { } It would be just as you're saying if you described it out loud: for i in 0 ..< min(5, products.count) { ... }

For-In Loops multiple conditions

拥有回忆 提交于 2019-12-01 16:24:04
问题 With the new update to Xcode 7.3, a lot of issues appeared related with the new version of Swift 3. One of them says "C-style for statement is deprecated and will be removed in a future version of Swift" (this appears in traditional for statements). One of this loops has more than one condition: for i = 0; i < 5 && i < products.count; i += 1 { } My question is, is there any elegant way (not use break ) to include this double condition in a for-in loop of Swift: for i in 0 ..< 5 { } 回答1: It

Xcode 7.3 autocomplete issues

六月ゝ 毕业季﹏ 提交于 2019-12-01 04:18:36
I've got some issues with the new autocomplete of Xcode 7.3 When I import a class, the class won't show up in autocomplete. Even more annoying, when an imported class contains a typedef NS_ENUM, the possible values won't show up either. In both cases, when I manually enter the class name or enum value, that perticular value will show up the next time, but for the possible enum values, all other values still won't show. Further, I've noticed the autocomplete isn't ordered (alphabetically) anymore.. So, for example, when I've got a class with initializers in the .h file: -(instancetype

xcode: Timestamped Event Matching Error: Failed to find matching element

守給你的承諾、 提交于 2019-12-01 02:03:14
I'm trying to record some XCUITesting functions. I get this error. Timestamped Event Matching Error: Failed to find matching element Is this an Xcode bug and/or issues with the complexity of my UI? I was having the same problem for a long time on a very complex app as well: The key is all in isAccessibilityElement being set to YES. UI testing and accessibility go hand-in-hand. The way I think about it is that the device needs to be able to interact with the element, since ostensibly, the user wouldn't be able to. I did this twice: In cellForRowAtIndexPath - cell.isAccessibilityElement = YES In

How to create static cells with dynamic cell heights with Swift

可紊 提交于 2019-12-01 00:47:53
问题 I have looked at several tutorials that show how to set dynamic cell heights, but all of them only show it if you are using dynamic cells by setting the appropriate constraints and using UITableViewAutomaticDimension . However, I would like to do this for static cells. I have a table view controller in my app that contains several cells that display a category with a disclosure indicator in which there is a title and then a description and the size of the description text varies. Thus, I

Xcode 7.3: import Module displayed with strikethrough

柔情痞子 提交于 2019-11-30 15:14:04
问题 After upgrading Xcode to 7.3, I just found that some modules are stricken out while importing, like in this screenshot: But after adding the module (so just pressing enter ) everything is fine. What does that mean? The module here is written in Swift and works fine. 回答1: This is a bug. We have fixed it in 218010af, which should be included in the Swift 2.2.1 release and is included in the 2016-04-12-a developer snapshot. 回答2: The strikethrough occurs if you try to import a module that has

Xcode 7.3: import Module displayed with strikethrough

我与影子孤独终老i 提交于 2019-11-30 13:49:22
After upgrading Xcode to 7.3, I just found that some modules are stricken out while importing, like in this screenshot: But after adding the module (so just pressing enter ) everything is fine. What does that mean? The module here is written in Swift and works fine. Xi Ge This is a bug. We have fixed it in 218010af , which should be included in the Swift 2.2.1 release and is included in the 2016-04-12-a developer snapshot . The strikethrough occurs if you try to import a module that has already been imported by your file or module: In this case, I have already imported Foundation (which

Swift Playgrounds: Replacement for captureValue(_:withIdentifier:)

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 12:11:51
Xcode 7.3 has deprecated XCPlaygroundPage.currentPage.captureValue(_:withIdentifier:) . Its predecessor, XCPCaptureValue() , was deprecated in Xcode 7.1. I'm wondering if there is any replacement, apart from implicit capture of collections and in loops? Apart from being more flexible using the explicit approach, the ability to add captions to graphs seems to be gone with the deprecation/removal (although the symbols are found, the aforementioned deprecated methods don't do anything, or at least not what you'd expect). There is currently no alternative or replacement. Graphs are only displayed

xcodebuild 7.3 can't enable bitcode

隐身守侯 提交于 2019-11-30 08:38:28
I'm developing an embbeded framework for iOS. In order to make an universal fat (with simulator and device slices), I created an aggregate target with a script that uses xcodebuild and lipo commands to generate it, as many people does. With XCode 7.x I had to add an user-defined settings with BITCODE_GENERATION_MODE=bitcode in order to enable it, but this has stop working since the last XCode 7.3 release. I've tried everything I found in the internet like add OTHER_CFLAGS="-fembed-bitcode" , but anything works as before... I have seen this in the build log: ENABLE_BITCODE is always NO, no

Xcode 7.3 debugger not showing custom class variables

只愿长相守 提交于 2019-11-30 06:40:54
I recently updated to Xcode 7.3 , however while debugging at break points , the objects show in the debug area but clicking the triangle to reveal the variables does nothing . I never had such issues with Xcode 7.2 . I have also have a Cocoa-pod Facebook Pop library in my project (incase its relevant) . I have updated it since upgrading to Xcode 7.3. Update : More specifically I can't expand custom class variables , but variable like NSRange do expand to show location and length , however I can't expand my custom ViewController classes etc. Phew .. The pictured setting did it for me . Also a