xcode

Accessing iPhone's current location

How can I store the latitude and longitude coordinates of the iPhone's current location into two different float variables? ...

Profiler for XCode, iPhone.

Does anybody know of a 3rd party profiler for XCode with the iPhone? I really don't like instruments, it's a pain to try to figure out whats going on. Allocations and leaks are fine, its just the CPU Sampler that I don't like. I really liked Shark but they have stopped updating that and it doesn't work with iOS4. ...

How to build universal ios static library

Hi I'm trying to build a static library that I can use with both ios3.x and ios4.x. I can build a static library with ios3.0 that works with another project in ios3.0 but won't compile in ios4. The same is true going from ios4 to ios3. Here's how to recreate: Open XCode 3.2.4 and start a new project that's a Cocoa Touch Static Libra...

[mapkit] error load map

error: /SourceCache/GoogleMobileMaps_Sim/GoogleMobileMaps-255/googlenav/mac/Loader.mm:231 server returned error: 503 and this is image:http://i.imgur.com/wXaNF.png I can't view image. when i build my map with xcode. i don't know how to fix this error. i try to run another example mapkit, but i met this error again. how can i fix it...

Best setting for record sound

What's the best settings for the recorder for recording voice? What should i replace with '?' in below code? recordSetting = [[NSMutableDictionary alloc] init]; [recordSetting setValue :[NSNumber numberWithInt:?] forKey:AVFormatIDKey]; [recordSetting setValue:[NSNumber numberWithFloat:?] forKey:AVSampleRateKey]; [recordSetting setValu...

Using variables in methods in objective c

Is there any way define a object in a method, call a method of another object, and in that method use the first object: -(IBAction)method{ class * instance = [[class alloc] initWithValue:value]; [instance method]; } The method defined in class.m file: -(void) method { instance.value = someOtherValue; } ...

Need help handling error message: Ivalue required as left operand of assignment

When I try to compile my code where ann is an annotation, coordinate is a 2d coordinate, and latit is a float ann.coordinate.latitude = latit; I get an error message saying Ivalue required as left operand of assignment. What does this error mean and why is it showing up? ...

What is the 'garbage value' in 'Left operand of '/' is a garbage value' warning generated by "Build & Analyze"?

When I 'Build and Analyze" this code in Xcode, I get a warning that I don't understand. Here's the method with the problem: -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{ UITouch * touch = [touches anyObject]; CGPoint location = [touch locationInView:self]; CGPoint relativePosition = CGPointMake...

Write iPhone requirements specification?

What do you use to draw iPhone ui and write iPhone requirements specification? ...

Xcode version and iPhone app submission

Hello, I am new to iPhone app development. I have an app created in XCode 3.1.3 and need to do 2 things; 1. Test it on my iPod touch (Latest OS: 4.1) 2. Submit it to the app store. My question is, can I do both these things given that I have XCode 3.1.3 OR do I have to upgrade? Also in case I need to upgrade, is it possible to download...

willAnimateRotationToInterfaceOrientation not being called in one subview while another is visible and rotated.

Hello all. I have 3 subviews in a UITabBarController. The first tab's view has objects which are manually moved when willAnimateRotationToInterfaceOrientation is called. However, if another tab's view is visible on rotate, willAnimateRotationToInterfaceOrientation is never called, and the items on the first tab's view are not in the rig...

glColor3i only drawing black

Why does this only draw black? glPushMatrix(); // Check the current color glColor3i(255, 0, 255); GLint currentColor[4]; glGetIntegerv(GL_CURRENT_COLOR, currentColor); //currentColor[0] = 254, 1 = 0, 2 = 254, 3 = doesn't matter glBegin(GL_QUADS); glLineWidth(1); glVertex2f(0, 0); glVertex2f(WINDOW_WIDTH * .1, 0); glVertex...

MPVolumeView appearing in other cells.

Hi, i am using the code below to implement a volume view into a cell. [[cell detailTextLabel] setText: @""]; MPVolumeView *systemVolumeSlider = [[MPVolumeView alloc] initWithFrame: CGRectMake(100, 10, 200, 100)]; [cell addSubview: systemVolumeSlider]; [self.view addSubview:cell]; [systemVolumeSlider release]; //[MPVolumeView r...

XCode - Import Sedna libs

What you I have to do in XCode to include the Sedna (Native XML DB) libs? The files are: /usr/local/sedna/driver/c/libsedna.h /usr/local/sedna/driver/c/libsedna.dylib I try to puts these path (/usr/local/sedna/driver/c) on "Search Paths"->"User Header Search Paths" and nothing. Code: #include <stdio.h> #include "libsedna.h" struct...

Bundle framework with plug-in in XCode

there is a post here on how to bundle a framework within an application. But in my case this is not application but a plug-in i want to put the framework within.. The "Installation directory" cannot start with @executable_path. so i have no clue on how to define the plug-in path any help would be great, thank you ...

How to dynamically create vertices in glVertexPointer() in openGLES

Hi, I have a set of textures which I need to draw at different vertices such that every texture is visible.I cannot define a static set of vertices since I load the textures dynamically and I dont know how many textures will be loaded everytime ( i choose them based on a condition). This is how my code looks as of now. for(int i=0;i<n...

Passing parameters to the method called by a NSTimer

How can I pass a parameter to the method called by a NSTimer? My timer looks like this: [NSTimer scheduledTimerWithTimeInterval:4 target:self selector:@selector(updateBusLocation) userInfo:nil repeats:YES]; and I want to be able to pass a string to the method updateBusLocation. Also, where am supposed to define the method updateBusLoc...

Replace char with especial shape

Does anybody have any idea on how to replace char with especial shape?for example if i wright 'S' replace it with small rectangular like below image ...

How to assign string in a variable as a title for button?

Hello all. In my app i need to assign a string as a title for the uibutton. How can i do this.For example NSString *date=[[NSString alloc]initwithString:@"Todays Date"]; //am trying to assign the date content as a title for my button [Button setTitle:date state:ForNormalSatate]; How can i set title as "Todays Date" for the button ...

Adding a UITabBarController to a UIViewController

Hi all, long time lurker first time poster :) I've been gradually skilling up on iPhone dev and have run into a hiccup - heres hoping someone out there can help me out. I have made a very simple Navigation based app (UIViewController). The view has a single button on the Main RootViewController. Next, I made 2 classes: TabOneViewContro...