xcode6

How to transition scenes in Swift

大兔子大兔子 提交于 2019-12-17 15:57:16
问题 In Objective-C, using Sprite-Kit, I would successfully use something like the following code in Objective-C to bring up a new scene if ([touchedNode.name isEqual: @"Game Button"]) { SKTransition *reveal = [SKTransition revealWithDirection:SKTransitionDirectionDown duration:1.0]; GameScene *newGameScene = [[GameScene alloc] initWithSize: self.size]; // Optionally, insert code to configure the new scene. newGameScene.scaleMode = SKSceneScaleModeAspectFill; [self.scene.view presentScene:

How to get the 3D view of UI in Xcode 6?

我怕爱的太早我们不能终老 提交于 2019-12-17 15:35:44
问题 I am a newbie in this field of development. I started using Xcode 6 after using Xcode 5.1.1 for a week. After getting fascinated with newly added features, I installed Xcode 6. Now, I am not able to find this 3D view of UI in ios. I am using OSX 10.9.4. 回答1: Run the app. View Debugging works in the simulator and on devices, but it's important to note that it needs to be an iOS 8 simulator or device. That said, you may allow earlier deployment targets in your project, just make sure you run on

Switching between Text fields on pressing return key in Swift

旧城冷巷雨未停 提交于 2019-12-17 15:19:27
问题 I'm designing an iOS app and I want that when the return key is pressed in my iPhone it directs me to the next following text field. I have found a couple of similar questions, with excellent answers around but they all just happen to be in Objective-C and I'm looking for Swift code, now this is what I have up until now: func textFieldShouldReturn(emaillabel: UITextField) -> Bool{ return true } It's placed in the file that's connected and controller to the UIView that contains the text fields

Writing a String to an NSOutputStream in Swift

风流意气都作罢 提交于 2019-12-17 11:07:13
问题 I'm trying to write a String to an NSOutputStream in Swift. Writing Strings that way with Objective C usually works by passing it as NSData NSData *data = [[NSData alloc] initWithData:[mystring dataUsingEncoding:NSASCIIStringEncoding]]; [outputStream write:[data bytes] maxLength:[data length]]; This does not work with swift var data: NSData = mystring.dataUsingEncoding(NSUTF8StringEncoding)! outputStream.write(data, maxLength: data.length) this yields the error 'NSData' is not convertible to

Writing a String to an NSOutputStream in Swift

孤者浪人 提交于 2019-12-17 11:07:11
问题 I'm trying to write a String to an NSOutputStream in Swift. Writing Strings that way with Objective C usually works by passing it as NSData NSData *data = [[NSData alloc] initWithData:[mystring dataUsingEncoding:NSASCIIStringEncoding]]; [outputStream write:[data bytes] maxLength:[data length]]; This does not work with swift var data: NSData = mystring.dataUsingEncoding(NSUTF8StringEncoding)! outputStream.write(data, maxLength: data.length) this yields the error 'NSData' is not convertible to

xcode 6 upload app with error: iTunes Store operation failed Error Description not available

删除回忆录丶 提交于 2019-12-17 10:35:51
问题 When I try to upload my app to iTC, after validate my app, I begin to submit it . But there is an Error that said " iTunes Store operation failed Error Description not available " When I upload with Application Loader 3.0, same error happened. 回答1: I had this error once, too. Then I realized the provisioning profile (Project Targets -> Code Signing) was set to 'Ad-Hoc' profile instead of 'Production' profile. Setting it back to 'Production' did the trick for me. 回答2: I've got the Answer, just

Default tab bar item colors using swift Xcode 6

﹥>﹥吖頭↗ 提交于 2019-12-17 08:31:38
问题 Environment: - Xcode 6 beta 4 - Swift language - iOS Tabbed Application (default xCode project) How can I change the default grey color of the tabs to something else? (Preferably globally) As far as my research goes I need to somehow change the image rendering mode for each tab to Original rendering mode however I don't know how 回答1: Each (default) tab bar item consists of text and icon. It is pretty easy to change the text colors globally by specifying the appearance: // you can add this

Default tab bar item colors using swift Xcode 6

拜拜、爱过 提交于 2019-12-17 08:31:13
问题 Environment: - Xcode 6 beta 4 - Swift language - iOS Tabbed Application (default xCode project) How can I change the default grey color of the tabs to something else? (Preferably globally) As far as my research goes I need to somehow change the image rendering mode for each tab to Original rendering mode however I don't know how 回答1: Each (default) tab bar item consists of text and icon. It is pretty easy to change the text colors globally by specifying the appearance: // you can add this

Xcode 6 with Swift super slow typing and autocompletion

跟風遠走 提交于 2019-12-17 08:05:33
问题 Is it just me or Xcode 6 (6.0.1) with Swift seems to be super slow when you type your code, especially with autocompletion? A normal Objective-C class, even if inside a Swift project, works almost the same as before, so it's Swift that kills it. Does anyone else experience the same inconvenience? Do you have any idea of how to improve performance? I tried to play with some settings but no luck. I've also of course tried restarting Xcode and the computer with no luck. No other heavy apps are

Xcode6: Run two instances of the simulator

岁酱吖の 提交于 2019-12-17 08:01:35
问题 I have two different targets for my iOS app. Is it possible to run simultaneously the two apps on two different instances of the simulator? It's ok if it would require not to benefit of the Xcode's debugger. So far the only solution I found was to install two versions of XCode, but that's a very heavy/space-consuming solution. 回答1: You can run two instances of the iOS simulator from the command line. They won’t be attached to Xcode debugging—indeed, it seems only to work if you do it without