xcode6

Initializing another window using storyboard for OS X

半腔热情 提交于 2019-12-20 10:13:08
问题 I have created a Cocoa application in Xcode6 which uses storyboards. As a template, Xcode provides a window for the application. I want to add a second window to show when the program is first loaded. So basically, there will be two windows showing up. I have put a window controller on Main.storyboard where the first window also resides. However, I couldn't find the way to show this second window when the program starts. Could you please help? Thank you. 回答1: In your Storyboard, select your

ERROR ITMS-4088 - Does not have permission to modify the application

泄露秘密 提交于 2019-12-20 09:46:36
问题 Ok, so I am trying to submit an app for a client of ours. They have invited me to their developer program as 'Admin' and we created all of the certs, provisioning profiles, and distribution profiles. I am able to select their account when submitting also. I go to submit the app via XCode 6.0.1 and it gets all the way to authenticating with iTunes Connect, then it throws this error... ERROR ITMS-4088: "The organization "Company Name" does not have permission to modify the application with the

unable to print object ('po') in xcode6 beta 6 osx swift project: (Error in auto-import: failed to get module '__ObjC' from AST context)

一世执手 提交于 2019-12-20 08:30:56
问题 An attempt to print object ( po command) in xcode 6 beta 6 OSX Swift project results in this error message: (lldb) po managedObject error: Error in auto-import: failed to get module '__ObjC' from AST context In this case the object in question is an instance of NSManagedObject . Any advice on how to help auto-import in getting __ObjC module into LLVM Abstract Syntax Tree context? 回答1: As of Xcode 6.1 if you attempt the po command twice it will work on the second attempt. The first po command

Swift 'text' is unavailable: APIs deprecated as of iOS7. textLabel does not work

痞子三分冷 提交于 2019-12-20 07:28:38
问题 I keep having this error I've seen other questions been answered by using textLabel.text, but it doesn't work in my case I'm new to swift so could someone please explain me why and how to solve this. 回答1: You need to unwrap textLabel by using an ! after textLabel . This is because textLabel is an Optional (hence the textLabel? type instead of just textLabel ). Read more about optionals here. Hope that helps! 来源: https://stackoverflow.com/questions/26330869/swift-text-is-unavailable-apis

does not have a member 'instantiateWithOwner'

坚强是说给别人听的谎言 提交于 2019-12-20 06:49:06
问题 I'm trying to make a popup like I described in my previous question. I actually got an answer, but now I have a new problem. I can make the view appear if I don't make the instantiateWithOwner , but it is not responding to anything (just frozen). In short, I have set up a 'popup.xib' file, which is just a view with a button and a label. My code below should make it appear and disappear with button clicks. I have read the documentation that the instantiateWithOwner does all the magic of

UIImageView Position Resetting during label text update

吃可爱长大的小学妹 提交于 2019-12-20 06:29:49
问题 Really weird issue going on here. Using XCode6 with iOS8 I have a simple UIImageView, which moves across the screen when I click. No problem- works great. I Just have a simple method to update specific labels...based on an int called StrikesLeft. Here is my updateLabels method: -(void)displayLabels{ //update strikes label strikesLeftDisplay = [NSString stringWithFormat: @"%d", strikesLeft]; lblStrikes.text=strikesLeftDisplay; } Here is the weird issue though: If I don't actually update the

How do I have one timer countdown and the other randomly move an object?

大城市里の小女人 提交于 2019-12-20 06:25:13
问题 I have the right code to move an object randomly and also to make numbers count down but I am not able to have an object move while the timer counts down. One thing I found weird though was that when I took out the part about the TimeLeft label the objects moved randomly but obviously the numbers did not count down. The main question is: how can I have a timer countdown and have the object move at the same time? (my main goal is to make the object stop moving once the timer reaches zero) I

SKTextureAtlas and 3x images

寵の児 提交于 2019-12-20 05:43:17
问题 Has anyone been able to get the simulator in xcode 6 to use the 3x images inside of an atlas? Whenever I load them into SKTextureAtlas it will use the 2x image instead. if i put test@2x.png, and test@3x.png inside of an atlas, my iphone 6 / plus simulator will always use the 2x image. let texture = shipAtlas.textureNamed("ship") // always uses 2x image 回答1: apparently you need to have launch images set (in project settings) in order for xcode to recognize different screen sizes properly 来源:

iAd's with Swift in SpriteKit

烈酒焚心 提交于 2019-12-20 04:54:43
问题 I am working on an app and would like to include iAd's. I have managed to add banner ad's and they work well. However i want to a larger add that fills most of the screen but not full screen. I added the adBanner using code from Benzene's Question and given solution from erdekhayser. Apple iAd Documentation (Page 3) The link i have referenced above is from the apple documentation and apple refer to the iAd as an MREC ad. This is what i would like to have. I cannot work out how to create and

Unable to run app in Simulator Xcode 6

最后都变了- 提交于 2019-12-20 02:54:42
问题 Yesterday i was testing my app in the iOS simulator and everything was working fine. I then decided to run the app on my iPhone and i got the error unable to install application, Unknown error occurred this has happened before so I cleaned my build folder (as this has fixed this issue before) however, the same error occurred. I then ran the app in the iOS simulator again and now i get the error Unable to run app in Simulator, An error was encountered while running (Domain =