xcode6-beta5

Why does using headerReferenceSize with self-sizing cells in a collection view cause a crash in iOS 8?

╄→гoц情女王★ 提交于 2020-01-01 08:02:09
问题 I managed to figure out the approach for self-sizing collection view cells under iOS 8. I want to do this as a part of a accessory view. I get a crash ... the interesting part of the stacktrace is as follows: ** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil' *** First throw call stack: ( 0 CoreFoundation __exceptionPreprocess + 165 1 libobjc.A.dylib objc_exception_throw + 45 2 CoreFoundation -[_

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

你离开我真会死。 提交于 2019-12-17 18:46:38
问题 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

How to implement NSCoding on a generic class in Swift?

独自空忆成欢 提交于 2019-12-04 17:31:42
问题 I am having trouble with generic classes and NSCoding in Swift (XCode beta 5). Specifically, this example code works nicely: class Foo : NSObject, NSCoding { let bar: String init(bar: String){ self.bar = bar; } func encodeWithCoder(aCoder: NSCoder!){ aCoder.encodeObject(bar, forKey: "bar") } required init(coder aDecoder: NSCoder!){ self.bar = aDecoder.decodeObjectForKey("bar") as String super.init() } } let foo = Foo(bar: "hello, world") NSKeyedArchiver.archiveRootObject(foo, toFile: "test

Why does using headerReferenceSize with self-sizing cells in a collection view cause a crash in iOS 8?

橙三吉。 提交于 2019-12-04 00:05:16
I managed to figure out the approach for self-sizing collection view cells under iOS 8 . I want to do this as a part of a accessory view. I get a crash ... the interesting part of the stacktrace is as follows: ** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil' *** First throw call stack: ( 0 CoreFoundation __exceptionPreprocess + 165 1 libobjc.A.dylib objc_exception_throw + 45 2 CoreFoundation -[__NSArrayM insertObject:atIndex:] + 954 3 UIKit -[UICollectionViewFlowLayout

How to implement NSCoding on a generic class in Swift?

懵懂的女人 提交于 2019-12-03 10:27:26
I am having trouble with generic classes and NSCoding in Swift (XCode beta 5). Specifically, this example code works nicely: class Foo : NSObject, NSCoding { let bar: String init(bar: String){ self.bar = bar; } func encodeWithCoder(aCoder: NSCoder!){ aCoder.encodeObject(bar, forKey: "bar") } required init(coder aDecoder: NSCoder!){ self.bar = aDecoder.decodeObjectForKey("bar") as String super.init() } } let foo = Foo(bar: "hello, world") NSKeyedArchiver.archiveRootObject(foo, toFile: "test.dat") However, when I try the same code, and add a generic parameter; when I try to encode the object; I

Swift TyphoonBlockComponentFactory Error in XCTest

人走茶凉 提交于 2019-11-29 14:19:27
i’m using Swift with Typhoon and Cocoapods. Everything worked well until i started to write an Integrationtest (according to the Typhoon-Example-App Test ) for my Typhoon component. I wanted to setup the TyphoonFactory in the Test setUp() method in the same way as i did in the AppDelegate . When i execute the test i always get a TyphoonBlockComponentFactory assertIsAssembly:] + 244: ERROR: MyApp.MyAssembly is not a sub-class of TyphoonAssembly error thrown by Typhoon (wich is using the kindOfClass method under the hood.) The same code is working perfectly in the AppDelegate and i can’t figure

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[

Swift TyphoonBlockComponentFactory Error in XCTest

社会主义新天地 提交于 2019-11-28 08:19:39
问题 i’m using Swift with Typhoon and Cocoapods. Everything worked well until i started to write an Integrationtest (according to the Typhoon-Example-App Test) for my Typhoon component. I wanted to setup the TyphoonFactory in the Test setUp() method in the same way as i did in the AppDelegate . When i execute the test i always get a TyphoonBlockComponentFactory assertIsAssembly:] + 244: ERROR: MyApp.MyAssembly is not a sub-class of TyphoonAssembly error thrown by Typhoon (wich is using the

Error Domain=NSURLErrorDomain Code=-1005 “The network connection was lost.”

自古美人都是妖i 提交于 2019-11-26 00:06:08
问题 I have an application which works fine on Xcode6-Beta1 and Xcode6-Beta2 with both iOS7 and iOS8. But with Xcode6-Beta3, Beta4, Beta5 I\'m facing network issues with iOS8 but everything works fine on iOS7. I get the error \"The network connection was lost.\" . The error is as follows: Error: Error Domain=NSURLErrorDomain Code=-1005 \"The network connection was lost.\" UserInfo=0x7ba8e5b0 {NSErrorFailingURLStringKey=, _kCFStreamErrorCodeKey=57, NSErrorFailingURLKey=, NSLocalizedDescription=The