xcode

Symbol hiding in static libraries built with Xcode/gcc

I'm trying to figure out whether I can build a static library that hides all of its internal objects and functions, etc, except for the interfaces I want to export. I'm experimenting with Xcode (gcc 4.2). I've used the __attribute__((visibility("hidden"))) attribute on some C++ classes per this documentation. I've also defined little he...

How to Pass value to webview from viewcontroller

I have UIViewController from which i have to pass nWordID value to Webview. This webview push another webview on which i have to use nWordID (use it on second webview). didselect method looks like: nWordID = [[rowData objectForKey:@"WordID"] intValue]; [PDF_Viewer passwordID:nWordID]; // Try but not work. PDF_Viewer is web view.pass...

How to activate Type 1 (.pfb, .pfm, .afm) font with Objective-C (Cocoa) on Mac?

How can I activate Type 1 font that is consisting of files like .pfb, .pfm etc. on Mac in Objective-C? I mean, only for my program, and not for the whole Mac (FontBook) - I just need to activate it, write a text and then deactivate. I tried ATSFontActivateFromFileReference, pointing it to any of these files - no luck. Googling didn't he...

Accessing UISegmentedcontrol selectedIndex - when contained in a UIButton contained in the UINavigationController.toolbar.

Hi! I am currently adding a UISegmentedcontrol to the toolbar in the navigation controller programactically (As below). This approach works fine, I have my UISegmentedcontrol, it fires the selector that I have setup no problems. Problem is - I would like to use the selectedIndex of this control in order to query my data model and pres...

MKCircleview Drawings

How to draw a text in MKCircleview? i have to print a text on the overlay of MKMapview. is it possible? ...

Problem with gdb in XCode 3.2.3

gdb (6.3.50-20050815, shipping with XCode 3.2.3) seems confused about the location of source code for one of my files. This is the partial backtrace: #0 0x00029c4f in -[STGameController endGame] () at iostream:76 #1 0x000266fd in -[STGameController exitButtonTapped:] () at iostream:76 #2 0x00482e14 in -[UIApplication sendAction:to:f...

how to use value of local variable in another method ?

- (void)viewDidLoad { } -(id)initwithinfo2:(NSInteger)pass_wordID2 { NSLog(@"pass_wordID:%d",pass_wordID2); } I want to use pass_wordID2 in viewDidLoad. How ? ...

Fill Table View with JSON

Here goes a newbie question: Create a new project in Xcode: File > New Project and select Navigation-based Application from iPhone OS templates. Install json-framework as explained here. Edit RootViewController.h's interface section into this: @interface RootViewController : UITableViewController { NSURLRequest *request; NSURL...

Updating SQL Database through PHP & xCode

Hi, I am trying to update a MS SQL Server database from my iPhone application. Here is what I have in the XCode: NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://www.xxxxx.com/UploadTextView.php"]]; [request setHTTPMethod:@"POST"]; NSString *postString = self.textView.text; [r...

Mimic Dock view in iPhone app?

Hi All, In my app I want to mimic the dock as displayed in Mac.Instead of using tab bar I want to use a dock kind of view in my app so that when a user taps on a dock item a new view is displayed.Is there any code or help availble for the same? ...

How to create programmatically an index in a SQLite database with Xcode ?

I use in my iPhone application a very big database. An index is used on one of its columns in oder to make the searchs in this database faster. The problem is that this index increases the size of the database : my application is now bigger than 20 Mo requiring a wifi download (I would like to remain below 20 Mo in order to allow 3G down...

xcode scm failure: conflict with [username].mode1v3 package file

I get this error in realtion to my [username].mode1v3 package file: Error: 155015 (A conflict in the working copy obstructs the current operation) Description: Commit failed (details follow): I can do a compare from the SCM results menu on this file. Doing so reveals 102 conflicts (differences) between my local copy and the l...

problem passing parameters to methods

Hi. I try to call a method with a float parameter but the value the method gets is not what I sent. Here is the code for the call (the actual call is the last part of the last line, [child setFaceDirection: direcao]; ): direcao = dirRadianos * 180 / M_PI; // direcao = The value I send NSLog(@"Value Sent: %f", direcao); // Log what ...

Why am I having memory leaks using Instruments on the device but not on the simulator

Hello, I am getting close to finishing the release of my application and are trying to use Instruments to fix any memory leaks. How come that I can spot one memory leak when using Instruments and my device but not when I am using the iPhone simulator? I understand that this is a high-level question, but I don't think posting any code ...

Xcode: setting to enable C++ even when no C++ sources are in the project?

I have an Objective-C/Cocoa project that incorporates a static library. That static library has some object files that have C++ in them. I've found that if the project that I'm using the library in contains no other C++ in it, the link fails (can't link new/delete/etc). But simply adding a single (empty) .cpp file to the project causes...

Debugging on iOS without a paid developer membership (3.x)

I currently have it set up for Xcode to Build & Go onto my iPod using this: http://il.youtube.com/watch?v=CHOVdi-kPV0 (A script to tell Xcode that it doesn't need to codesign). This works, except when the app launches, it closes instantly and Xcode says it failed to launch. You can manually reopen the application and it works 100% after....

I'm using three20 in an iphone iOS 4 project. I cant compile the project to the device

I try to compile but it fails because it find a duplicated definition of class in one of the dependencies and in the main dependency. I googled a lot and i even found the cause of this, due to a bug in xcode and the optimization for amr6 and arm7 code. But i could't found how to solve this. Has anybody use the three20 library with iOS4 ?...

TDD for an OSX app

Are there any good solutions out there for TDD of a MacOSX Objective-c app? EDIT: more info I would really like something similar to rSpec from the Ruby world. Is the XCode built in stuff sufficient? I have heard that it is not. I would like something that supports Mocks, Stubs, and most/all of the test conditions supplied by rSpec (or...

Git Ignore Pattern for XCode Build Directory

I am new to Git, and this is my first project using Git rather than SVN as my source control. I am working in XCode on an iPhone project. I want Git to ignore the build directory, which is in the root folder of the XCode project. I've found several other questions here and also found articles on google that provide examples on how to cre...

link css and javascript to xcode iphone app

I have copy and pasted the css and js files for Copy Bundle Resources and removed them from Compile Sources. How do I "link" or "import" them so I can use the css and javascript files? Can anyone enlighten me? ...