iphone

iPhone: mechanism for adding and reading app-wide data

Hello friends. I'm looking for a mechanism to add and read app-wide data, something similar to Web.config under .NET. I'm thinking of creating an AppConfig.plist, and in there I'll store URLs to web services, etc. so that these values can be read and used throughout the app. Is this an effective way to achieve what I'm after? Do you g...

How do you access the current user's record in Address Book?

Is there a way in the Address Book API to access the current user's record programatically? In other words, if this iPhone belongs to John Smith, to get the contact record that is John Smith (whichever record is marked as Me in Contacts)? Obviously you can popup the picker and let the user select themselves from their Contacts, but th...

uploading images/audio from iPhone to server not able to send big images

Hi, I dont know if it is a problem with my iPhone code or SERVER. I am uploading Image/Audio from iPhone to server using NSURLConnection. The images and audio get uploaded just fine if their size is less than 60KB. If it is more than 60KB, I get a 400 Bad Request response from the server. I am not sure whats happening. I am clueles...

iPhone SDK - get/calculate camera field of view (FOV) (Augmented Reality)

Is there a way to find out or calculate the field of view (FOV) an iPhone camera has through calls to the APIs? Or is it something you have to physically and manually find out for yourself? If it cannot be fetched or calculated with the APIs, but instead has to be hard-coded into an app, then what's the best way to find out what kind of...

iPhone - How can i create a tableview with rows in interface builder?

I've seen a lot of applications where they have for example a login page. The username field and password are in a grouped (rounded) tableview. Is it possible to do this with interface builder alone? If yes what's the trick? Or does it have to be generated by code? How can i create the following form? ...

How do I parse this timezone with NSDateFormatter?

I have a date string like this: 2010-09-04T19:13:00Z But how do I configure the NSDateFormatter to accept this timezone format? I have tried googling and all, but no luck. Thank you Søren ...

Where the magnifying glass takes the color when editing a UITextField ?

Hi, I have a UITextField with background color set to ClearColor and the text is white. The view has an image as background dark. When I want to edit the text, the magnifying glass background is also white or very light color, and you can't see the text. What can I do to force the background of the magnifying glass to be darker ? tha...

UIPicker first appears black

I have the following code to draw a custom picker. Unfortunately when the view is first drawn is black. Only when I touch it does it appear. How can I fix this? Here is the relevant code in the UIView: - (void)drawRect:(CGRect)rect { [self createPicker]; [self addSubview:dPicker]; //[dPicker reloadComponent:1]; } -(void) cr...

iPhone/iPad In app rating?

Hi I have seen that some apps have a option for the user to rate their app from within the app. Anyone here knows how to do that? Thank you Søren ...

How to change the default Xcode iphone simulator when testing

I don't know why but now the default iphone simulator launched when I build the project is "ipad", but I want it to use iphone 3g instead. Any way to set this preference? Thanks. ...

Is this unnecessary warning?

I have a following static method in one of my utility class + (UIImage *) getImage:(NSURL*) fromUrl { //Warning here NSData *urlData = [NSData dataWithContentsOfURL:fromUrl]; UIImage *image = [[[UIImage alloc] initWithData:urlData] autorelease]; return image; } For this method I'm receiving a bellow warning message war...

AVFoundation camera tutorial

Hi All, Is there a basic tutorial for the AVFoundation for use with the camera anywhere? UIImagePicker isn't the right tool for my app and it looks like this is but I'm not sure how to get it going. I can kind of see how to take a picture using AVCaptureStillImageOutput but I can't see how to display the camera view onto the screen. ...

Push Notification with a timer - iPhone

I would like to send a push notification to the user but I want it to appear only for few seconds and not to stay on the screen. Can I set a timer to close the received notification? ...

How to improve blending performance to make smooth scrolling?

Fast intro Edit: I have 9 cells. All 9 cells contain bundle image. 7 bundle images have some kind of transparency (in file, not as a blending option in code) to load images from web underneath them. The scrolling problem affects the table view when both bundle and web images are loaded into arrays as UIImage objects. If I disable draw...

how to re add removed items from tool bar

i hav removed items from tool bar,but i want to re add it at particular time ... how to do it.. i dont have images for them.... NSMutableArray *itemsToReplaceOldOnes=[[NSMutableArray alloc] initWithArray:self.toolbar.items]; [itemsToReplaceOldOnes removeObjectAtIndex:2]; //remove UIBarButtonItems you want to remove [self.toolbar setItem...

Changing backgroundview of a uitableviewcell to nil

Hi, I have a grouped table view and I don't want a see the background for a specific cell, because I put a picture in this cell. So in the cellForRowAtIndex, I put cell.backgroundView= nil;. But it don't works, but If reload the data of the tableview now the background of my cell disappear. How I can disappear the background on the first...

Problem when masking UIImage

I took a sample code from the following URL: how to mask an image in order to mask an image. The code is working perfectly on the iPhone simulator but works incorrectly on iPhone 4 simulator (that's when high-res images are loaded...) Here is my code and the mask function: - (void)someMethod { UIImage* image = [UIImage imageNamed...

iPhone SDK on MAC server

can I install iPhone SDK on mac server? I want to upload iPhone project and compile it in the server is that possible at all. Thanks in advance ...

subarrayWithRange with large data

iPad application I have a large text file which I want to divide into several pieces and process them in a loop. I used the following code: NSArray * contentArray = [stringFromFile componentsSeparatedByString:@" "]; for(...){ contentRange = NSMakeRange(lastPosition , newLength); NSArray * subContentArray = [contentArray subarr...

How to save my own object with NSKeyedArchiver??

Hi, i've got problems using the NSKeyedArchiver/NSKeyedUnarchiver for saving my object. I added the methods - (id)initWithCoder:(NSCoder *)decoder and - (void)encodeWithCoder:(NSCoder *)encoder. The problem is when i try to save the object it doesn't work correctly. I could imagine a problem (but I'm not sure if it is the problem ;) ). ...