iphone

How do you access a website running on localhost from iPhone browser

I am working on a Mobile website and would like to test it using my iPhone browser. My Win7 machine and iPhone are on the same wireless network. How do I access local host from the iPhone? Right now I get a 404 error. TIA ...

Initally visible cells gets invisible after calling reloadSections:withRowAnimation: method

I want to display a table which has multiple sections and initally only 3 elements of sections are shown. When user taps the section footer, section footer gets lost (becomes nil) and all elements of that section will be shown to user. For this reason, when the user taps the section footer, I call below code: -(void)loadMoreRowsInSect...

UIButton inside UIScrollView doesn't fire on tap

UIButton inside UIScrollView doesn't fire on tap. Please help resolve it. // Add a button UIButton *btn1 = [[UIButton buttonWithType:UIButtonTypeCustom] retain]; btn1.frame = CGRectMake(0, 0, 26, 18); btn1.bounds = CGRectMake(0, 0, 30.0, 30.0); [btn1 setImage:[UIImage imageNamed:@"btnchecked.png"] forStat...

Socket Connection Example for iphone

Hi, I would like to know some sample code to make socket connection from iPhone app and send some date to the lisining port. Thanks, Manish Bahal ...

File disappears when using NSKeyedArchiver between iOS 3 and iOS 4.0

I tried to save a file in iOS 3.1.3, and I upgraded the OS to iOS 4.0. The file disappeared. I used NSKeyedArchiver and NSKeyedUnarchiver to manipulate the file. ...

How can I send request and get a file response in iPhone?

Hello everyone My problem is the following... I read about sending http requests and receiving their responses on iPhone SDK 3.2 using NSURLRequest and NSHTTPURLResponse (All my requests are "get" and there's no "post") but I don't know how to do that exactly cause some of my responses are just strings (plain text) and some others are ...

Getting the serial number (not UDID) of iphone programmatically

Hi friends. can anyone tell me the way for getting the serial number of an iPhone (not the UDID). any immediate help will be appreciated.. ...

iPhone API libraries for popular websites...

What are (open source) libraries for iPhone that allow your user to interact with popular websites? Twitter, Facebook, Myspace, Ebay etc... Please post as much of the following as you can: the name of the website that the library is used to interact with the name of the library the author's name a link or download information the l...

Detecting steps taken during walk using IPhone

hi Guys! is it possible that i can detect with application for the amount of indoor walk using Iphone SDK. ? if so then what steps should i follow to achieve. thanks ...

Memory Leaks in Lib Xml Parser

Hi Guys, If I do nil, I am not getting the leaks but I am getting the exceptions due to nil object. I am getting its retain count as 4. How can I make its retain count to 0 - (void) dealloc { printf("\n Hai I am in Dealloc Method of Customer Lib Xml Parser......................"); self.connection = nil; xmlFreeParserCtxt(_xmlParserCont...

How do I lazy load 100+ pages in a UIScrollView with paging enabled?

I'm creating a comicbook-like application. I'm using a UIScrollView with paging enabled to display the hi-res full-screen images (the app works similar to Photos.app but with zooming disabled). The final product will have nearly 200 images that need to be paged through by the user. How do I go about setting up the UIScrollView for such a...

Bug in Addressbook-API in iOS4?

I have discovered something strage when accessing the Addressbook-API on iOS4. //address ABMutableMultiValueRef address = ABMultiValueCreateMutable(kABDictionaryPropertyType); CFStringRef keys[5]; CFStringRef values[5]; keys[0] = kABPersonAddressStreetKey; keys[1] = kABPersonAddressCityKey; keys[2] = kABPersonAddressStateKey; k...

How to draw dotted lines using Quartz on iPhone.

I am new to iPhone development. I am developing an application in which I need to draw dotted lines between a couple of points. I know I have to use CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound) and also CGContextSetLineDash(UIGraphicsGetCurrentContext(), 0, lengths, LENGTH_OF_ARRAY). But everytime I try this, I can...

UIWebView not displaying .rtfd.zip files

I have an app with a UIWebView and a UITableView. The UIWebView displays an .rtfd.zip file with the same name as the selected table row. I use this code: NSString* sourceFilePath = [[NSBundle mainBundle] pathForResource:[self title] ofType:@"rtfd.zip"]; NSURL* url = [NSURL fileURLWithPath:sourceFilePath isDirectory:NO]; NSURLRequest* re...

How to slide in/out statusBar and navigationBar simultaneously?

I'd like to show and hide the statusBar and the navigationBar simultaneously using a slide effect. This is how I tried: [[UIApplication sharedApplication] setStatusBarHidden:hide withAnimation:UIStatusBarAnimationSlide]; [self.navigationController setNavigationBarHidden:hide animated:animated]; However, the duration of both animation...

NSXMLParser not parsing on iPhone

Hi all, I'm facing a problem in which NSXMLParser is parsing the data provided to it by an XML file on localhost on simulator but not on iPhone. I'm using the following code: NSURL *url = [[NSURL alloc] initWithString:@"http://192.168.10.2/justmeans/trunk/apimediadata?m=newsfeed&offset=0&limit=20"]; NSXMLParser *xmlParser = [...

cllocation getDistanceFrom/distanceFromLocation

Hi all, i've define a cllocation var and if nil, i'll give my newlocation value in delegate -(void) locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { if (myStart == nil) { self.myStart = newLocation; when i call if ([myStart re...

Bonjour service to interact with keyboard

Hi I want to create an iPhone app where i press an A key, and a computer connected to the local network over wifi would respond as if the A key was pressed on its own keyboard. Would i need to write a Bonjour service on the machine to detect and handle the key presses, hooking into the keyboard? Are there any starting points? Thanks....

Why can't I tap input elements after I resize a scroll view?

I have a sample project that uses the metrics from notifications for resizing the keyboard when a text field is focused. http://www.smallsharptools.com/downloads/ObjC/KeyboardSize.zip The series of text fields are all wrapped inside of a UIScrollView and when the keyboard is shown a notification is sent with the height value. I use tha...

How persistent is [NSUserDefaults standardUserDefaults]?

Hi all, I'm using [NSUserDefaults standardUserDefaults] for storing application settings. My questions are: do those settings are removed on app deletion? are they kept after an application update (through the AppStore)? Because I'm using it to store a password and don't want my users to reset them at each update. Also, I'd like th...