objective-c

Global Variable problem

I define a global variable flag in global.h file,when i click next tab bar then i can not access the flag value.I want a global variable for all tabs.please suggest me. ...

NSURLConnection Error

Hi All, What is "Error Domain=NSURLErrorDomain Code=-1020 UserInfo=0x1694a0 "Operation could not be completed. (NSURLErrorDomain error -1020.)"" due to ?? ...

handling same touch event with multiple control (parent and child)

I need to handle a touch event on my custom uiviewcotroller. I have a sub controller within the view that already handle touch event (it's a plot that handle zooming and scrolling). I want to make a tabbar disappear when I tap the screen once. Actually it only works (even tought the tabbar doesn fade away but simply is no visible) in the...

UIView frame origin doesn't set good

Hi guys! Here is my code: frame = _pageContentView.frame; NSLog(@"%f; %f; %f; %f;", frame.origin.x, frame.origin.y, frame.size.width, frame.size.height); frame.size.height = pageContentView.frame.size.height; NSLog(@"%f; %f; %f; %f;", frame.origin.x, frame.origin.y, frame.size.width, frame.size.height); _pageContent...

AudioServicesPlaySystemSound not playing sounds

hi All, I am playing a small .wav file using the AudioToolBox. AudioServicesPlaySystemSound (soundFileObject); But sometimes it is not playing. What is the reason ??? Thanks ...

UILabel not updating

Sorry the basic question, but this bugs me for a while now. I create a details view from a UITable and try to dynamically set its labels, but they are not updating: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { myObject *tmpObj = [[myObject objectAtIndex:indexPath.section] objectAtInde...

Is there any way to identify a settings as a tab rather than doing it iphone settings menu?

I want to configure text font, size etc inside the application (for example in tabbar) rather than iphone settings menu.. How will I achieve this? ...

iPhone application update (using Core Data on Sqlite)

I have an app which is using Core Data on Sqlite, Now I have a update which has some DB structure changes say adding a new table I know when an app get updated, it updates the app binary only, nothing on document directory will be changed. When the app gets updated and launchs at the first time and run [[NSPersistentStoreCoordinator a...

What are the z-coordinates in Cocoa mouse events for?

Interestingly i didn't find the answer for this seemingly trivial question - Cocoas mouse events have z-coordinates - what are they for? ...

TableView - iVar reset when returning from details view

Hi, anyone knows what I need to do to retain my TableView iVars whilst pushing a details view onto the navigation stack? I have an array and a date defined as iVars and the array is retained, whilst the date is not. I checked whether there may be an autorelease hidden somewhere but there are no obvious ones. The properties are defined...

UIAlertView is not showing. What am I doing wrong?

Here is the code: -(IBAction)signUpBtnPressed:(id)sender { UIAlertView *alert = [ [UIAlertView alloc] initWithTitle:@"k" message:@"Thanks for Signing up!" delegate:nil cancelButtonTitle:@"Continue..." otherButtonTitles:nil ]; [alert show]; [alert release]; } I also have my S...

Writing multiple NSData to File

I need a hint on how to write multiple NSData chunks to single file. Downloading a file using NSURLConnection in chunks. Each chunk is downloaded in a separate NSOperation thread. As the chunks finish downloading they need to be written to a file so combined result is the file downloaded. What would be the best way to manage the NSData ...

XCode project complains about missing files if a linked framework contains private headers

My Problem is this: My framework contains public and private headers - the public headers import private headers in the framework My app that links against this framework imports public headers Now when I compile it, XCode complains about missing files (the private headers that are indirectly imported via the frameworks public header...

Using setters On Int?

Just curious, given: unsigned int pulseCounter_001; @property(nonatomic, assign)unsigned int pulseCounter_001; @synthesize pulseCounter_001; Is there any reason to use: [self setPulseCounter_001:0]; Or just use: pulseCounter_001 = 0; Style wise I think the latter says "we are setting an int" better, just curious as to any overhe...

Why doesen't it work to write this NSMutableArray to a plist?

edited. Hey, I am trying to write an NSMutableArray to a plist. The compiler does not show any errors, but it does not write to the plist anyway. I have tried this on a real device too, not just the Simulator. Basically, what this code does, is that when you click the accessoryView of a UITableViewCell, it gets the indexPath pressed, e...

Global NSString

I need to create an NSString, so I can set its value in one class and get it in another. How can I do it? ...

Graphical glitches when adding cells and scrolling with UITableView

I am using a UITableView to display the results of a series of calculations. When the user hits 'calculate', I add the latest result to the screen. When I add a new cell, the UITableViewCell object is added to an array (which is indexed by tableView:cellForRowAtIndexPath:), and then I use the following code to add this new row to what is...

Accessing View in awakeFromNib?

I have been trying to set a UIImageView background color (see below) in awakeFromNib [imageView setBackgroundColor:[UIColor colorWithRed:0 green:0 blue:0 alpha:1.0]]; When it did not work, I realised that its probably because the view has not loaded yet and I should move the color change to viewDidLoad. Can I just verify that I have ...

Interpret Objective C scripts at runtime on iPhone?

Is there anyway to load an objective c script at runtime, and run it against the classes/methods/objects/functions in the current iPhone app? MAJOR NOTE: The major reason I'd like to do this is to allow me to rapidly prototype an application, and then, after I'm done a major prototyping phase, take the scripts I was writing and compile...

iPhone: Accessing the User's Currency Symbol

Hi, In my iPhone app, I'd like to determine the currency symbol for the region that the user is currently in. Eg, if the user is in Europe, I'd like to display the euro symbol. If in the US, I'd like to display the $ symbol. Where would I be able to access this in my iPhone app? Thanks! ...