xcode6-beta6

Swift AnyObject is not convertible to String/Int

假如想象 提交于 2019-11-29 04:45:24
问题 I want to parse a JSON to object, but I have no idea how to cast AnyObject to String or Int since I'm getting: 0x106bf1d07: leaq 0x33130(%rip), %rax ; "Swift dynamic cast failure" When using for example: self.id = reminderJSON["id"] as Int I have ResponseParser class and inside of it (responseReminders is an Array of AnyObjects, from AFNetworking responseObject): for reminder in responseReminders { let newReminder = Reminder(reminderJSON: reminder) ... } Then in Reminder class I'm

fatal error: NSArray element failed to match the Swift Array Element type

我怕爱的太早我们不能终老 提交于 2019-11-28 08:57:26
Suddenly I'v started getting run time error as, fatal error: NSArray element failed to match the Swift Array Element type I'v declared my array as, var myArray : [CUSTOM_CLASS] = [CUSTOM_CLASS]() Now, in my server response success block I have, self.myArray = dicResponse["data"]! as Array println(self.myArray) // FATAL ERROR HERE Which was working perfect before upgrading to Xcode6 Beta6 FYI : dicResponse["data"]! // is verified as valid (Sorry to pointing wrong place before!) SOLVED : Dont know but I'd made some changes and it works, var myArray = [AnyObject]() self.myArray = dicResponse[

How to add buttons to navigation controller visible after segueing?

試著忘記壹切 提交于 2019-11-27 17:42:09
I have set up a view controller in Storyboard which is embedded in a navigation controller. In this nav controller I have checked Shows Navigation Bar and Shows Toolbar and enabled a navigation bar and toolbar in Top Bar and Bottom Bar respectively in Simulated Metrics. I then "Show e.g. Push" segue from the view controller to another view controller. On both view controllers I've set up Simulated Metrics the same way, so both the navigation bar and toolbar are visible on all three controllers. The problem is, I can add bar button items to the first view controller to both the navigation bar

Use Cocoapods with an App Extension

泄露秘密 提交于 2019-11-27 10:09:27
I'm trying to build a photo App Extension in Xcode 6 Beta-6 that uses cocoapods libraries. The bridging header that Xcode creates for the photo extension can't see anything from cocoapods. For example: #import <GPUImage/GPUImage.h> results in the error "GPUImage/GPUImage.h" file not found . I've tried every conceivable path for the import (with brackets and quotes) and have had almost no success. The exception is that for simple pods like SVProgressHUD , the following ugly terrible hack works: #import "../Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.h" . But for GPUImage, it walks into the

[NSObject : AnyObject]?' does not have a member named 'subscript' error in Xcode 6 beta 6

二次信任 提交于 2019-11-26 22:48:55
I used the below couple of code lines to get the frame of the keyboard when its shown on the screen. I've registered to UIKeyboardDidShowNotification notification. func keyboardWasShown(notification: NSNotification) { var info = notification.userInfo var keyboardFrame: CGRect = info.objectForKey(UIKeyboardFrameEndUserInfoKey).CGRectValue() } This used to work in beta 5. I downloaded the latest Xcode 6 version which is beta 6 and this error occurred at the second line. '[NSObject : AnyObject]?' does not have a member named 'objectForKey' After some Googling, I came across this solution. And I

How to add buttons to navigation controller visible after segueing?

流过昼夜 提交于 2019-11-26 19:08:12
问题 I have set up a view controller in Storyboard which is embedded in a navigation controller. In this nav controller I have checked Shows Navigation Bar and Shows Toolbar and enabled a navigation bar and toolbar in Top Bar and Bottom Bar respectively in Simulated Metrics. I then "Show e.g. Push" segue from the view controller to another view controller. On both view controllers I've set up Simulated Metrics the same way, so both the navigation bar and toolbar are visible on all three

Use Cocoapods with an App Extension

杀马特。学长 韩版系。学妹 提交于 2019-11-26 17:54:27
问题 I'm trying to build a photo App Extension in Xcode 6 Beta-6 that uses cocoapods libraries. The bridging header that Xcode creates for the photo extension can't see anything from cocoapods. For example: #import <GPUImage/GPUImage.h> results in the error "GPUImage/GPUImage.h" file not found . I've tried every conceivable path for the import (with brackets and quotes) and have had almost no success. The exception is that for simple pods like SVProgressHUD , the following ugly terrible hack works

[NSObject : AnyObject]?&#39; does not have a member named &#39;subscript&#39; error in Xcode 6 beta 6

╄→尐↘猪︶ㄣ 提交于 2019-11-26 08:28:48
问题 I used the below couple of code lines to get the frame of the keyboard when its shown on the screen. I\'ve registered to UIKeyboardDidShowNotification notification. func keyboardWasShown(notification: NSNotification) { var info = notification.userInfo var keyboardFrame: CGRect = info.objectForKey(UIKeyboardFrameEndUserInfoKey).CGRectValue() } This used to work in beta 5. I downloaded the latest Xcode 6 version which is beta 6 and this error occurred at the second line. \'[NSObject : AnyObject

An error was encountered while running (Domain = LaunchServicesError, Code = 0) [duplicate]

蓝咒 提交于 2019-11-26 00:44:02
问题 This question already has answers here : Unable to run app in Simulator : An error was encountered while running (Domain = LaunchServicesError, Code = 0) (19 answers) Closed 2 years ago . I received an error (Domain = LaunchServicesError, Code = 0) when trying to launch my app in the iOS Simulator with Xcode 6. I looked for solution in google, but I didn\'t find anything practical. What does this error mean? 回答1: This error indicates that there was a problem with installation. Unfortunately,