xcode6

I add a “align” constraint, but Xcode add a “pin” constraint autolayout

 ̄綄美尐妖づ 提交于 2019-12-25 04:45:29
问题 When we add constraints, we have the choice between "Align" button in the auto layout toolbar or "Pin" button. In my storyboard, if I add a new alignment constraint "Bottom edges" between a scrollview and his container. The icon of this constraint is 2 squares and a line. But after, in the list of constraints of my scrollview, the icon is different : The icon is a "Pin" icon. I don't understand why. One more question, I think it's related : what is the difference between "Align bottom" and

xcode 6 symbol navigator shows each class twice

旧街凉风 提交于 2019-12-25 04:24:09
问题 Looking at my project in the symbol navigator view, I noticed each class listed twice. They are identical, but the code runs fine, what is going on? 回答1: Even if Xcode 6 isn't in Beta anymore, there are still a lot of issues(Editor stops working etc.). In most cases these errors can be resolved by simply restarting Xcode. If that doesn't help you, try to Clean your project: Product->Clean . Also you could clean Xcode manually by deleting all files inside ~/Library/Developer/Xcode/DerivedData

How to have a textfield scan for all values in an array individually in swift?

你。 提交于 2019-12-25 04:13:09
问题 I am relatively new to swift and programming languages of its kind, and I have really been struggling with having a textfield look for ALL values individually in a string array. So here's my code: var greetingArray = ["Hi", "hi", "hello", "Hello", "hey", "Hey", "sup", "Sup", "What's up", "what's up"] Above is the array, and below is the textfield's action. @IBAction func textUltraAction(textout: UITextField) { } If the "textout.text" is any one of the greetings in greetingArray (but not all

Swift Compile Error Bitcast requires both operands to be pointer or neither

假如想象 提交于 2019-12-25 03:54:42
问题 In Xcode6 beta 1 something similar to this worked, however with Xcode6 beta 4 there were errors. After fixing the errors the errorless code I have is below For Background : The class I'm using here implements ABPeoplePickerNavigationControllerDelegate which allows you the user to select a contact from the address book. I want to get the first email that is added to that person. func peoplePickerNavigationController(peoplePicker: ABPeoplePickerNavigationController!,didSelectPerson person:

Can't link connector from UIImageView declared as an IBOutlet in a class to the corresponding UIImageView on the View Controller in storyboard

女生的网名这么多〃 提交于 2019-12-25 03:43:29
问题 This question is a follow up to: Can't link connector from IBOutlet to View Controller I would now like to link another object of UIImageView called image, defined in class B to the same UIImageView on the ViewController. I wasn't able to do this using the same method. I imagine this is because, the UIImageView on the ViewController is now of custom class B, and the object image is an instance of UIImageView. I tried to cheat xcode by changing back the custom class of the UIImageView to

JSON & Xcode 6 UITableView

元气小坏坏 提交于 2019-12-25 02:43:23
问题 I am needing an example of binding some Json results from a Wcf service URL to a UITableView in Xcode 6. I have tried combining information from a couple tutorials I found that focus on creating an NSDictionary from the Json and loading that into a label or text box, and another that was almost spot on in using an NSArray of the Json with a UITableView, however the Json datasource was a file path as opposed to a URL and it was missing some key information that a beginner in Xcode needs. I'm a

NSURLErrorDomain Error Code -1005

点点圈 提交于 2019-12-25 01:41:30
问题 I'm working on the CS193p coursework from Stanford (I'm not a Stanford student I'm just trying to learn), assignment number 5, where we have to get images from Flickr using calls to the Flickr api. I'm only trying to download a list of the pictures and print them out to the console, but I'm getting an NSURLErrorDomain with code -1005. The error message I am printing out is below: error: Error Domain=NSURLErrorDomain Code=-1005 "The operation couldn’t be completed. (NSURLErrorDomain error

String not convertible to [AnyObject]

风格不统一 提交于 2019-12-25 01:23:40
问题 I have a string declared as var searchString = "" I am trying to do parse query as shown below: query?.whereKey("username", containedIn: searchString) What is the issue? This is in Xcode 6.3 updated and also Swift 1.2. 回答1: The function expects an array of AnyObjects, you supply a String. Simply wrap the string in an array... query?.whereKey("username", containedIn: [searchString]) 来源: https://stackoverflow.com/questions/29874174/string-not-convertible-to-anyobject

Navigation Controller Error

≡放荡痞女 提交于 2019-12-25 00:23:06
问题 I have a navigation controller and I want the title to have a custom font. I have tried to do this but when it runs I get Thread 1: EXC_BAD_INSTRUCTION (code=EXC_1386_INVOP.subcode=0x0) Here is my code. import UIKit class PriceCheckSpreadsheetViewController: UIViewController { @IBOutlet weak var SpreadsheetView: UIWebView! @IBOutlet weak var Loading: UIActivityIndicatorView! @IBOutlet weak var BackButton: UIBarButtonItem! @IBOutlet weak var ForwardButton: UIBarButtonItem! @IBOutlet weak var

Getting SIGABRT in custom uiview using xib in Xcode 6 using Swift

我与影子孤独终老i 提交于 2019-12-24 17:13:02
问题 I have created a custom view with two labels by following some tutorials online. I have connected the custom xib to the swift class file with outlets for the two labels. When I initialise the view from the view controller where I need to present the view, I am getting a SIGABRT error on the line let view = nib.instantiateWithOwner(self, options: nil)[0] as! UIView The code for the custom view class is as follows: import UIKit @IBDesignable class LevelButton: UIView { @IBOutlet weak var