xcode6
Swift: How do I create a predicate with an Int value?
You will need to change %@ for %i and remove the extra parenthesis: Main problem here is that you are putting an Int where it’s expecting an String. Here’s an example based on this post: class Person: NSObject { let firstName: String let lastName: String let age: Int init(firstName: String, lastName: String, age: Int) { … Read more
“Add New Constraints” checkboxes and fields are disabled
I had the same issue. In my case, the view layout setting was set to Translate Mask Into Constraint. I resolved it by changing it to Automatic in Size Inspector.
Unable to run app in Simulator : An error was encountered while running (Domain = LaunchServicesError, Code = 0)
I fixed it by resetting the simulator: iOS Simulator > Reset Contents and Settings…
Swift Enumerations .toRaw and .fromRaw with Xcode 6.1
Create an enum from a raw using the failable initializer with rawValue and get the raw value using the attribute rawValue. if let a = TestEnum(rawValue: “a”) { println(a.rawValue) } Read the changelog for more information.
xcode 6 pch.file not found
Make new file: ⌘cmd+N iOS/Mac > Other > PCH File > YourProject-Prefix.pch. Make sure you display “All” and not “Basic”. (Blue buttons) Project > Build Settings > Search: “Prefix Header”. Under “Apple LLVM 7.0” you will get the Prefix Header key. Type file directory. e.g: “$(SRCROOT)/$(PROJECT_NAME)/ProjectName-Prefix.pch”. Clean project: ⌘cmd+⇧shift+K Build project: ⌘cmd+B