objective-c

Does the iPhone use the .vcf to store the address book data?

Hi, everyone, I want to ask a question about the iPhone address book. I am writing a program, it relates to the CardDav server and the .vcf file. I want to use the NSURLConnection to connect the server and download the .vcf. However, I am not sure that the iPhone can read and write the .vcf file or not. One thing I can sure that is th...

UIButton Tag overwrittened

How do you make sure that the UIButton tag is not overwritten by the previous tag? for example: (IBAction)addButton:(id)sender { if (buttoncount == 2) return buttoncount++ UIButton *newButton ... // Should I change this to setTag? newButton.tag = buttoncount; // This line doesn't seem to work newbutton.tag = newButtonCount NSInteg...

Generating a tone using DTMF and playing it with AVAudioPlayer.

I want to generate a custom DTMF tone and play it on the iPhone. In order to do so, I have created and allocated a memory buffer with a custom tone (ptr). Now I want to create a NSData object, initialized with the memory buffer, and pass it to AVAudioPlayer using initWithData:error: instance method. I wrote the following code, but when ...

how should i move up or down the custom plot symbol drawing using Core-plot in iPhone?

I used to charts using core-plot framework, my requirement is draw vertical line as a plot symbol in scatter chart, i need to move up or down according the value, how should i do it? please help me out? Sri ...

Rotated 2d rectangle intersection detection

I have 2 rectangles they are placed arbitrarily and I have rects all four corner point like struct Rect { NSPoint topLeft; NSPoint topRight; NSPoint bottomLeft; NSPoint bottomRight; } I want to check whether 2 rectangles intersects. I am looking a method similar to NSIntersectsRect . But NSIntersectsRectwon't respect the rota...

Data Formatters temporarily unavailable

Hi all, I had a problem with my iPad application that is, I need to download more than 10,000 images from a server at a time. I successfully downloaded more than 8000 images, But after that I got an exception like "Program received signal: “0”. Data Formatters temporarily unavailable, will re-try after a 'continue'. (Unknown error loa...

Download a file to iPhone

Hy Everybody, I hope enyone cann explain me how I can save an file on the iPhone I get the file with NSURL so fare no prob. I'd like to donload the file and work with the donloaded file. But I have no Idea how. ...

What is the cleanest and best way to switch views?

I've seen a lot of posts and videos on switching views and many of them have vastly different approaches. Some swap the entire view (via a delegate class), some use presentModalViewController:animated:, etc. So I ask: what is the best, cleanest, and most memory-friendly way to switch views? (I use view switching as a way to show complet...

How to search 'objects' in NSMutableArray in objective-c

Hi, I am working on a application in which i need to search values in array which is storing the values from xml. I shall be thankful for this. with Regards Prateek Bhanot ...

iPhone OS 4.0.x - blocking I/O operations in background

I'm currently implementing some logic for reading from TCP socket in the background mode. CFReadStreamRead function is being used to fetch some data from socket and for now everything works fine. But I'm wondering how iPhone OS 4.x treats blocking I/O operations in the background mode. For example: CFReadStreamRead function may block f...

Contents of UIScrollView gets re-rendered when a UITableView in a UIPopoverController is scrolled

The title pretty much sums it up, but what's happening is that I have a UIPopeverController popping up and presenting a UITableView from a toolbar button. Underneath the popover I have a large UIScrollView with several PDF pages being rendered into CATiledLayers using Quartz. Whenever I try to scroll in the popover (the UITableView real...

How to set a Navigation bar and Toolbar in UISplitView Controller

Currently I am doing an app on Airport tracker on iPad. Actually I want to add a navigation bar at the top of the splitviewcontroller and a toolbar at the bottom of the splitview. It should look like this: http://appshopper.com/finance/expense-tablet, but I can't find the way to do this part. Can anybody here provide me an idea to solv...

Maximum size of the iPad Application

Hi all, Is any one now the Maximum size of the application when we are playing with it?. I just want to know it because of my application is having more than 10000 images. Please reply me Thanking you, Sekhar Bethalam. ...

Open URL In Safari

Hello, In objective c in mac development, how do i open a url in safari? I know how to in iPhone dev but not in Mac Dev Thanks! ...

NSUserDefaults & bindings.

Hi, How can I synchronize two interface elements and have the value saved at termination? I connected a checkbox' state and a text field's enabled to an NSObjectController. The "content" outlet is connected to the checkbox too. (Not sure why?). It works with the NSObjectController but whenever I bind the value's to an NSUserDefaultsCont...

Comunication between iOS Application and .NET Application?

I have 2 application, one is iOS app and one is .NET app. I want my iOS app send an message (call a method of .NET app, send some string to .NET app to save to database). So, how can my iOS app can comunicate with .NET app? Anybody can help me. Thanks :) ...

AddressBook: trying to add 'Home' and 'Work' addresses, only 1 shows up.

I'm trying to add a 'Home' and 'Work' address my Person record. It seems only 1 shows up (the one added later. Is if possible to add multiple addresses to a Person and see them displayed in the UnknownPersonViewController? If so, how should I do this? Here's my code: void multiValueAddDictionaryValueAndLabel(ABMultiValueRef multi, CFDi...

how to use two navigation controller in same page for iPhone Application

hello I have been used no. of page in my app. and i am pushing one from other.All data are are coming from from server.In every page one part of page is fixed at start while pushing remaing part of page is pushed . This is working fine. even i have used back button all things are doing fine But the problem arises when i reached to last...

How do I call this methods with a parameter in ObjC

Hi everyone, I'm quiet new in ObjC and app programming. All I want to do is fade in an image. For that I did this: -(IBAction)changeImg:(id)sender{ myImgView.image = [UIImage imageNamed:@"image.png"]; myImgView.alpha = 0; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:1]; myImgView.alpha = 1;...

Send a NSString with \0

I am trying to send a string terminated with \0 to a tcp socket but it seems the \0 does never reach its destination. Using this code: NSString* s=@"<b/> \0_"; uint8_t *buf = (uint8_t *)[s UTF8String]; int resCode = [outputStream write:buf maxLength:strlen((char *)buf)]; I only seem to send @"<b/> ". Probably the \0 is seen as the ...