iphone

Receiving Error Domain=kCFErrorDomainCFNetwork Code=2 when attempting to read from ReadStream

I'm attempting to synchronously read from a CFReadStream objected created by CFStreamCreatePairWithSocketToHost. The stream opened fine but when I attempt to invoke CFReadStreamRead on it in a loop, CFReadStreamRead() returns -1 and the resulting error is: Error Domain=kCFErrorDomainCFNetwork Code=2 "The operation couldn’t be completed...

InApp Purchase on slow network

Updated : I got "cannot connect to iTune Store" alert after 6 minutes. Is it possible to set any time out value while inApp Purchase. My InApp purchase code works fine in normal network, but in very slow network(safari browser will take 5 min to load a webpage). I am not getting any delegates... - (void)requestDidFinish:(SKRequest *)re...

displaying datepicker on the tap of a particular text field only

hi, i have a number of textfields . i want to display datepicker on the tap of a particular textfield only. wat i have is a number of textfields for entering details of a person like Name, address, date of birth etc... On the tap of text field for entering the date of birth i want to display date picker. if i include the code for the da...

OAuth with Google Reader API using Objective C

I'm using the gdata OAuth controllers to get an OAuth token and then signing my requests as instructed. [auth authorizeRequest:myNSURLMutableRequest] It works great for GET requests but POSTs are failing with 401 errors. I knew I wouldn't be able to remain blissfully ignorant of the OAuth magic. The Google Reader API requires paramet...

Binding to an XML Schema in Objective-C (iPhone)

Hi, Is there any way (built-in, 3rd party library, etc) that I can bind to an XML Schema in Objective-C on the iPhone? Thanks, Mihai ...

digital zoom iphone sample code

Hello everyone, any one has sample code or know of a tutorial on how to do a digital zoom for an iphone? or digital zoom in general ? thank in advanced. -Amir ...

iPhone to Android Market

(I am coming from an iPhone experience) When we create an iPhone app, Apple gives us a http URL that we can put on web pages that when clicked will open iTunes and give the user a chance to buy on their desktop. As Android has no "iTunes" Windows/Mac application on the desktop, what do I link to on my Web pages/email marketing so that ...

Slide in the second tab bar view by clicking on item in the first

I have an app with three tabs that switch views instantaneously when the user taps them. The first view is a table view selecting which 'location type' to filter by, to only show those pins (add those annotations) to the second view, a MapView. When a table cell is clicked, it switches instantaneously to the mapview, using this code: s...

Opening safari in iphone app using HTTP post

I'm trying to open the Safari browser in my app using http post. I know how to do this using get, but I can't find anything for http post. Any help would be appreciated. Thanks! ...

Adding Extra Title Attributes to MKAnnotation?

Currently I have a subClass of MKAnnotation and I was wondering if its possible to add extra tile attributes. Currently MKAnnotation adds Title Subtitle Is there a way I could add two more lines / NSStrings to allow 4 lines of text? Title SubTitle Location Date gary ...

How to recreate the default UIView the same as the default tableView:viewForHeaderInSection:?

I tried to implement the - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section to get the text label of the header in section of black color instead of the white color, but it looks so different from the default one created by the SDK, mine is so ugly. How to recreate the UIView with exactly the sa...

UIWebView load images in low quality..

I have a UIWebView and I laod some simple html text. the text has just img tags in body. <html><head></head><body> <img src="http://somewhere.com/image.jpeg" width="100%" /> </body></head> and a part of the original image is http://img84.imageshack.us/img84/2033/20100525124321.png but on the iPhone it looks http://img215.imageshac...

iPhone SDK: Storing username and password in the code.

Hi, In my app, user can upload files to a ftp server. To open the connection and write to the server, I need to use username and password. Having FTP username and password in the code looks like a security issue. Can someone please tell me how can I securely store this in my code and use it to connect to the server? Thanks a lot! ...

NSString, what does localizedString mean?

I am sorry if this is an FAQ, but what is the difference between the two statements below? I have been looking on google and also on Apples documentation and I can't seem to find a salid difference. My best guess is the localised one is optimised to be updated at runtime. Could anyone kindly clarify for me? NSString *title1 = [NSString ...

NSMutableArray Problem - iPhone

Hi, I'm trying to get a UITableView to read it's data from a file. I've attempted it like this: NSArray *paths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *fullFileName = [NSString stringWithFormat:@"%@/entries.plist", documentsDir...

iPhone Safari Web App opens links in new window

Hi there, I have problem with web after adding icon to Home Screen. If the web is launched from Home Screen, all links will open in new window in Safari (and lose full screen functionality). How can I prevent it? I couldn't find any help, only the same unanswered question. Please help. Thanks. ...

Pass string from tableviewcontroller to viewcontroller in navigation stack

How should I pass a string to the view controller that gets pushed when a tableviewcell is selected. Should I create a custom init method in the view controller? eg [[myvc alloc]initWithURL:...] Set a property? eg [myvc setURL:...] or myvc.url = ... or just create a custom method? [myvc setLoadingURL:...] ...

Memory problem with basic UITableView when scrolling

I have a very simple UITableView that has 3 sections, and 3 rows per section. #pragma mark - #pragma mark UITableView delegate methods - (NSInteger)tableView:(UITableView *)tblView numberOfRowsInSection:(NSInteger)section { return 3; } - (UITableViewCell *)tableView:(UITableView *)tblView cellForRowAtIndexPath:(NSIndexPath *)index...

Objective-C properties are not being recognized in header file?

I wonder if I'm doing something completely stupid here... I'm clearly missing something. I've gotten used to the pattern of defining properties of a custom class, however I seem to be hitting a point where extended classes do not recognize new properties. Case of point, here's my header file: #import <UIKit/UIKit.h> #import "MyTableView...

Split NSData objects into other NSData objects with a given size

I'm having an NSData object of approximately 1000kb big. Now I want to transfer this via bluetooth. This would be better if I have let's say 10 objects of 100kb. It comes to mind that I should use the -subdataWithRange: method of NSData. I haven't really worked with NSRange. Well I know how it works, but then to read from a given locati...