xcode4

UITableViewController Background Image

橙三吉。 提交于 2019-12-05 04:03:11
How can I set an image for UITableViewController ? I have used many things but it doesn't help me to set the image as background UIImageView* bgView = [[[UIImageView alloc] initWithImage: [UIImage imageNamed:@"Default.png"]] autorelease]; [tableView.backgroundView addSubview:bgView]; And this [[self view] setAutoresizesSubviews:NO]; UIView *backgroundView = [[UIView alloc] initWithFrame:self.view.frame]; backgroundView.backgroundColor = [UIColor colorWithPatternImage: [UIImage imageNamed:@"Default.png"]]; self.tableView.backgroundView = backgroundView; self.tableView.backgroundColor = [UIColor

Adding an OpenGL framework in Xcode 4

青春壹個敷衍的年華 提交于 2019-12-05 03:56:10
I'm using Xcode 4 for my C++ programming. I want to add a framework, specifically an OpenGL framework, and I'm not quite used to where things are yet. It says in the help documentation that I should select the target, and from there I get the summery pane where I can add a linked framework/library. When I do that, the summery pane doesn't show up. It does show up when my target is a cocoa application, but since I'm programming in C++, I choose the command line tool, and select the language from there. So, how exactly do I add the OpenGL framework to my target? maybe go under "build phases"

Old code gives “Unused parameter” error but never has before now

孤人 提交于 2019-12-05 03:35:45
I've opened up some old iOS code and when I try to build it I get an "unused parameter" error for code like this: - (void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar { NSLog(@"Search Bar isn't used in this function"); } This is the first time I've ever seen an Objective-C compiler spit out errors (not warnings) for this. Since a lot of iOS calls don't necessarily use the passing arguments (examples being a lot of callbacks), I need help in getting rid of this. Michael Dautermann Solution # 1) In your Xcode project's "Build Settings", there's a parameter for "Unused Parameters". Reset

Howto “sandbox” my Lion application?

人走茶凉 提交于 2019-12-05 03:27:39
Apple has decreed that all applications submitted to the Mac App Store must be sandboxed, starting in November. Ok, but how can I "sandbox" my app? I found the official Apple's guide Code Signing And Application Sandboxing Guide . This document lists the following steps: 1) "Enable sandboxing for your application." Ok, easy: I have to open Xcode 4, select the project, select the target, go to the Summary tab and check: "Enable Entitlements" "Enable App Sandboxing" ...and every single entitlement I'm interested in. 2) Then: "Once you have created a basic entitlements profile, you should sign

How to remove reference of file Xcode?

微笑、不失礼 提交于 2019-12-05 02:40:57
I had removed some files from my iOS project a while back and thought they had been completely deleted. After a long time I created another class which unfortunately had the same name as one of those that I had removed from my project (but the reference nor the file had been removed). To make the long story short, my project tried using the reference to the old file, so I went through finder to delete the conflicting files. That solved the issue of which class was being reference. But the reference to the deleted files cause a warning in Xcode giving me a Missing File message. Does anyone know

Where is MainWindow.xib in new Xcode project?

佐手、 提交于 2019-12-05 01:55:52
I started a new project in Xcode 4 using the TabBar template. I noticed that there was no MainWindow.xib file in the project. Did Apple get rid of this file? How can I access the Mainwindow without this file? MainWindow.xib was kind of superfluous to begin with, keeping in mind that it doesn't really contain any "visible" components (thinking of the window as an invisible container) and that usually you don't need to modify it. (That said, I'm only a beginner in iOS development myself, so I would appreciate my observation being corrected if I'm wrong). MainWindow.xib's role in the beta version

“Strip Debug Symbols During Copy” and “Strip Linked Product”

别等时光非礼了梦想. 提交于 2019-12-05 01:42:15
I read a lot of thing and discovery this configs have 2 side effect: Make the binary size smaller The program show a better debug crash I am building program for iOS, so I want my binary to be the smallest possible. This mean: If I set YES to both config, my binary will be the smaller If I set NO , I will get better debug crash So I have to set YES for AppStore version and NO for Debug? You are correct, set it to YES for AppStore build and NO for debugging builds. Even when you build you AppStore version, there is dsym file containing all symbols you need to symbolicate your crash logs. A dSYM

Generate code for core data attributes in xcode 4

和自甴很熟 提交于 2019-12-05 01:34:56
In xcode 3 there was a helpful feature in the data model builder where you could highlight some attributes/relationships in an entity, right-click, and choose to copy method and property declarations to the clipboard. (You could choose if you wanted objective-c 2.0 property declarations also). Then you could paste them into your NSManagedObject subclass. I see how you can still generate the entire class file; but this isn't helpful if you are adding attributes to an existing entity. Have they removed this feature from xcode 4? I used it all the time! See the Core Data Model Editor Help:

store folders in package contents (bundle resources) in xcode 4.0

China☆狼群 提交于 2019-12-05 01:33:29
I need to store a folder in the package contents, not all files in the project all in one root folder. How can I do this in XCode 4.0? Right now I am going to the Build Phases > Copy Bundle Resources to attempt these changes. Create your folder in the filesystem, then drag it to the resource folder in XCode. In the following dialog select create folder reference for any added folder. The folder should be blue. This folder is copied to your bundle with its contents. 来源: https://stackoverflow.com/questions/5720478/store-folders-in-package-contents-bundle-resources-in-xcode-4-0

Can't Rename Files In Xcode 4 Anymore?

限于喜欢 提交于 2019-12-05 01:13:41
Seriously, in previous versions of XCode I could right-click a file or group in XCode and I would get the "rename" option. In XCode 4 I can't seem to rename my files in XCode directly anymore. What happened? Why would Apple remove such a feature? How can I rename my nibs, image resources, and others in XCode now? The contextual menu item was removed, but you can still rename from within. Select the file and then click again in the name and you should get the editor field. Type away to rename. It can be a little temperamental though. The biggest problem I usually have is doing the 2nd click too