xcode4

Why are my targets in Products colored red? [duplicate]

天大地大妈咪最大 提交于 2019-12-06 18:12:30
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: .app file appears in red (missing) in new projects with Xcode 4 With seemingly no provocation, the three .app entries in the Products folder of my hierachy are listed in red. Show In Finder is greyed out when I right click them, even if I build them first (and building is successful, no errors). Any idea what's happening? 回答1: Assuming that you are talking about iOS apps: Xcode shows only the .app built for the

Should We use 2 different Images or Single Image for Landscape and Portrait Mode

三世轮回 提交于 2019-12-06 16:21:11
I am doing a app for iPad in which we have added two images one for Landscape and the other for portrait mode, I have written code for. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // in this method we have called landscape and portrait frames basing on the // status bar rotation if it is turned to landscape then the landscape image // is called and the textfields frames are set else portrait image is set and // then the textfield frames are set on to it. } Can somebody help me out by saying is the right way of using 2 different images, or we

Multiple projects using the simulator

拥有回忆 提交于 2019-12-06 16:11:33
I am comparing the run of multiple projects using the Xcode simulator. Each time I go to build in one project after having run one of the other projects Xcode tells me that it cannot perform the build and run because the simulator is in use. I then have to find the other project window, stop the run in the simulator (Cmd-.) and then switch back to the previous window and rebuild. Can I make a single keyboard shortcut to stop the current run in the simulator, build and run the current project in the simulator? There is a little bit of doing involved in making this happen but overall it's pretty

Place mediaItemCollection data in UITableView

天大地大妈咪最大 提交于 2019-12-06 16:05:19
I need some help placing the mediaItemCollection data in a UITableView . Code: // Responds to the user tapping Done after choosing music. - (void) mediaPicker: (MPMediaPickerController *) mediaPicker didPickMediaItems:(MPMediaItemCollection *)mediaItemCollection { [self dismissModalViewControllerAnimated: YES]; [musicPlayer stop]; [[MPMusicPlayerController iPodMusicPlayer] stop]; [[MPMusicPlayerController iPodMusicPlayer] setQueueWithItemCollection:mediaItemCollection]; [[MPMusicPlayerController iPodMusicPlayer] play]; } The mediaItemCollection is what I need to place into my UITableView . I

Mac OS X Lion 10.7.2 Xcode 4.2 memory issues

六眼飞鱼酱① 提交于 2019-12-06 15:57:20
I've got MacBook Pro 2011, 15" i7 2GHz 8GB Ram 1333 MHz OS X Lion 10.7.2 all updates installed released to this date. I have done everything what I can to minimize RAM consumpsion and the only problem I've got at this point is when I run Xcode. I had 4gigs of RAM, than bought 8 gigs and always 've got 10-30 MB of free memory after 3-5 minutes of Xcode running and PAGE INS are 300MB - 700MB. I tried to switch to 32-bit running mode but no change. Can anybody help me please? justin Yes. One way is to disable indexing, another is to reduce the number of build processes. These are hidden

XCode 4.5.2 working issues

丶灬走出姿态 提交于 2019-12-06 14:15:00
I have recently downloaded Xcode update 4.5.2 and it seems to performing slow. I have tried other applications and everything is running fine. I'm currently developing an app and it's been performing so slowly, that I can't edit an UIlabel box. Just in case: remove the contents in the "~/Library/Developer/Xcode/DerivedData" - Folder and see if it still stalls. I had a sluggish Xcode once and that helped. 来源: https://stackoverflow.com/questions/13294521/xcode-4-5-2-working-issues

StoryBoard 2 navigation controller pointing same View

感情迁移 提交于 2019-12-06 13:42:44
Does anyone know why this does not work? With this, just one tab bar load the view, the other make black screen. I Have tried without Navigation Controller, and Tab bar is correct and the other doesn't show the tabBar item in running mode. My answer for this problem if anyone is interested. Add two views that will launch the view we are interested. Same file for this 2 views : @interface PushToAgenceViewController : UIViewController @end -(void) viewWillAppear:(BOOL)animated { [self performSegueWithIdentifier: @"pushName" sender: self]; } 来源: https://stackoverflow.com/questions/11684787

application is closing just after first launch

别来无恙 提交于 2019-12-06 13:39:14
问题 I have build signed the iPhone application with Adhoc provisioning profile,after installing the application directly through Xcode it launched and then closed. I want to know this is correct behavior or something is wrong in my source code? I am using Snow Leopard 10.6.6 version of Mac OS. 回答1: Please consider the following : restart xCode ensure the adHoc provisioning profile is properly installed on the device using the Organizer. do a clean & build use the organizer summary panel to add

Instrument (XCode4) report ASIHttpRequest leak memory?

為{幸葍}努か 提交于 2019-12-06 13:37:31
问题 I get Instrument tools in XCode 4 report memory leaks from ASIHttpRequest... I didn't be able to figure out the problem, turned our I commented out all my code to handle the result and make the function like below, but xcode still report the same memory leak... This method is called everytime when I click a button, and I will see more memory leak happen every time when I hit the button. :( - (void) loadData { // no data set, we need to load ourself NSURL *url = [self getDataUrl];

when exactly do Interface Builder items get instantiated?

空扰寡人 提交于 2019-12-06 11:26:59
Say I create a navigation based application from the template in XCode4, then there will be in the MainWindow.xib a Navigation Controller, which has as a child the RootViewController. When exactly would then: Instance of RootViewController be created? This instance be associated as a child with the Navigation Controller? In particular when in relation to the timing for the applicationDelegate "didFinishLaunchingWithOptions" method and when it occurs. As given in the plist the MainWindow is the Main nib file base name. So there is some hidden code which will be generated based on the plist to