iphone

Error Domain=SKErrorDomain Code=3 UserInfo=0x2a5a00 "Cannot connect to iTunes Store"

I am trying to implement InApp purchase in my application. I have implemented it as per Apple's programming guide and it(code) was working fine until I created new application, appid, provisioning profile and in-app products @ another developer account. Now, it gives me following error. Error Domain=SKErrorDomain Code=3 UserInfo=0x2a5a0...

Adding extra fields for an AddressBook contact using iphone simulator

Hi EveryOne, I was new in iPhone application development. As i might have gone through native applications, i was struggling from 1 week, for adding new fields to a particular contact of AddressBook. As we might have known that it is not possible to edit addressBook details, i want to bind those values to sqlite3 table & then i thought...

SplitView Controller portrait mode- Top button keeps shifting to right.

Hi, I am using SplitViewController in ipad. On a button click from detail view, I open a modalview which is in full screen mode. Whenever I dismiss the modal view, the button which displays the table view in portrait mode shifts to the right. If I continue the process of opening the modal view and dismissing it, it keeps moving to the...

UIWebView in portrait

In Safari, if you double-tap on a text column, it zooms in to that column. When you rotate the phone, that column is scaled to fill the screen making the text larger and thereby preserving the “view” I selected when I double-tapped. In my own web view, rotating the screen it preserve my “view” when i double tap for two times. whats the p...

how to delete a image from iphone application

I am working an iphone app where i am giving the option of downloading an image to user's iphone. Following is my code for downloading of image. UIImage *image = [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:urlAddress]]]; NSString *pngFilePath = [[[NSString stringWithFormat:@"%@/",docDir] stringByAppe...

MFMailComposerViewController doesn't always display attachments

I'm attaching a few files to an email to export from the application I've written, namely a .pdf and a .png. I create these by rendering some view to a context and creating an image and a pdf. I can validate that the files are created properly (I can confirm this by looking in my apps sandbox from Finder, and also by sending the email. I...

how to add tab bars?

Hi all, i m having an view based application, in my second view i want to have an 5 tabs. but i hv no idea how to implement it. i hv already added 5 tabs,but its not working, any tutorials or somethionng will be very helpfdul thanks a ton ...

KVO on the "windows" value of UIApplication?

The following is not working: [[UIApplication sharedApplication] addObserver:self forKeyPath:@"windows" options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld) context:NULL]; Together with that, on the Observer side: - (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)chang...

store parameters in iPhone

Hi guys I try to store parameters in iphone application for example I want to store username and password after login. And next time when I re-open iphone application, I can re-get that username and password to login automatically. Thank you! ...

Can't set background colour for UIView from ViewController

I have the following code in the view controller: - (void)viewDidLoad { [super viewDidLoad]; ThemeManager *themer = [ThemeManager sharedInstance]; UIView *theView = self.view; UIColor *forBackground = [themer backgroundColour]; [theView setBackgroundColor:forBackground]; } but when execution gets to the setBackgroundColor line...

Rapid taps on an OpenGL ES app introducing input delay

I am starting out writing a 2D game in OpenGL ES, and I have encountered an odd problem: if I rapidly tap the touchscreen, the input starts lagging behind the display. The more times I tap, the more delay it causes between the input and any indication of that input onscreen. It only happens if I intentionally tap very rapidly, but not ...

i want to trigger a nib file when someone touch on an image

hi all i am new in the field of iphone development .... i am working on a game in which when user touches on an image then a nib file must pop up on the screen i am unable to generate that event please help how i should link the nib file to the touch event such that the file pops up on the screen.. so please provide some sample code...

objective-c singleton memory deallocation

Should I somehow release shared object (on which singleton is based) when my application terminates if no garbage collector used (iPhone environment)? ...

Displaying timecode using NSTimer and NSDateFormatter

Hi. I am very close to completing my first iphone app and it has been a joy. I am trying to add running timecode using the current time via an NSTimer displaying the current time (NSDate) on a UILabel. NSDate is working fine for me, showing hour, minute, second, milliseconds. But instead of milliseconds, I need to show 24 frames per ...

Should TcpClient be used for this scenario?

I have to communicate with an iPhone. I have its IP Address and the port (obtained via Bonjour). I need to send a header that is “0x50544833” (or similar, It’s an HEX number), then the size of the data (below) and then the data itself. The data is just a string that looks like this: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE pl...

UIScrollView zoom after rotation

Allright, i have a UIScrollView with some drawings inside. the zoom and scroll works fine until i zoom in and then rotate. after the rotation zoom is fine but when i zoom back my drawings shrink more than i intend them to. So basically, when i zoom out after rotation the view gets smaller than the screen.. how can i fix this problem ? an...

add button to navigationbar programatically

Hi i need to set the button on right side, in navigation bar, programatically , so that if i press the button i will perform some actions, i have created the navigation bar,programatically by navBar=[[UINavigationBar alloc]initWithFrame:CGRectMake(0,0,320,44) ]; similarly i need to add the button , right side of this navigation bar,...

How to change the navigation bar style in Three20 TTThumbsviewcontroller in iphone?

I am using Three20 to create a thumbnail view. I want to change the navigation bar style to black from black translucent.If i give blacktranslucent it works fine ,if i change it the the thumb nail view is lowered like this image.How can i change it? Please help me out.Thanks. ...

Detect if NSString contains a URL and generate a "link" to open inside the app a Safari View

I have am reading a twitter feed in my iPhone application and can do it correctly, but I'd like to evolve it in a way to detect if the whole NSString contains any URL or URLs and create a "link" that will open a UIWebView within the same application. Can you guide me on how to perform this task? -(void) setTextTwitter:(NSString *)text ...

How to create session with iphone sdk ?

Hi, I made story book with iphone sdk . I created different views by coding. When user read story book I want to know that currently which view is read by user because I want to store value of current view and If user closed the application and start again at a time user can read from current. So guide me about the problem. Thanks ! ...