iphone

NSStream SSL on used socket

I am writing an application that uses NSStream's SSL functions on the iphone. I know that SSL is working because I can directly connect servers using SSL. I have encountered a problem where protocols that use starttls require me to communicate on the socket with unsecured, send the starttls command and then reuse the same socket for SSL....

What has an namespace to do with XML?

Something confuses me here: The NSXMLParser method has a namespaceURI attribute: - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName From the documentation I couldn't figure out what they mean by "namespace". Can someone explain with ...

UITableViewCell doesn't clear context before drawing

Hi, I have a subclass of UITableViewCell which contains several elements - UIImageViews, Labels, etc. Since this cell is intended to be reusable, I want to be able to change it's appearance a bit depending on what data it is currently displaying. So as an example - I have this view in my custom UITableViewCell: UIImageView* delime...

Objective-C: How Can I Access String Variable As a Global?

Hi, I am new to iPhone development. I want to access a string variable in all the class methods, and I want to access that string globally. How can I do this? Please help me out. ...

NSObjCMessageLoggingEnabled tracing for iPhone Device

Hi, I googled many results to make NSObjCMessageLoggingEnabled work with iPhone. But it seem it works only on the simulator. Can NSObjCMessageLoggingEnabled track also the objc_msgSend of iPhone device? And how please? Thank you ...

iPhone: Parse Integer out of NSURL/NSString (NSScanner?)

Hi, I am trying to build an iPhone App, where I read an RSS feed and have to parse out the id of an article from the URL. The links provided by the RSS feed are like the following: http://example.com/variable/path/components/352343/index.html I need 352343. So basically I need to search for at least one digit between slashes (path comp...

Launch Safari from iPhone App

I know that i can use the following code to launch my own url, but i want the user to continue their workflow after using my bookmarklet so therefore don't want to open a new tab and have them re-load the url i put into the url variable? NSURL url* = [NSURL URLWithString:@"http://google.com"]; [[UIApplication sharedApplication] openUrl:...

iPhone SQLite question.

I have an sqlite table in my game that keeps track of scores. How do I make one of the columns track scores in ascending order instead of descending order? ...

Difference between + and - methods in Objective-c

What is the difference between methods that are declared with - and methods that are declared with + e.g - (void)methodname + (void)methodname ...

How do i stop NSXMLParser?

what am i doing wrong? i cant get the xmlparser to stop parsing. i set a breakpoint on [xmlParser abortParsing]; and it gets run. but so does everything after if(success) here is my code: -(void)viewDidLoad{ [NSThread detachNewThreadSelector:@selector(loadstuff)toTarget:self withObject:nil]; } -(void)loadstuff{ NSAutoreleasePool *...

Simple example of CALayer usage -- perhaps in a UITextField

Hi, I have an requirement to implement a custom keyboard for a Cocoa Touch data entry screen containing multiple UITextFields. I've built the keyboard, and everything is working except now I need to figure out how to implement a blinking cursor. (When you disable the UITextField's built-in keyboard, you lose the cursor as well). In googl...

How do you add a UIToolbar on top of screen?

Is it possible to have a UIToolbar on the top of the screen? The example application would be like "Calendar" where it has the "+" on the right, and then the "Calendars" button on the left. ...

How to remove grey shadow on the top UIWebView when overscroll?

Hi, I'm using UIWebView for show a simple HTML page. When I scroll the page (over the top or over the bottom) a shadow gray appears behind!! Can I remove or avoid this bad effect? Thx P.S. UIWebView, View container, are all background clear and opaque NO!! ...

IPHONE - how to load videos from the library?

Any application can access the library and camera roll and get pictures from there. There's any equivalent way to get videos instead? I mean, to show a list of all video files the user has on the device and let the user select one, playing that one after that? thanks for any help! ...

Left aligned image in iPhone navigation bar

Hi, currently I'm doing self.navigationItem.titleView = [[[UIImageView alloc] initWithImage:image] autorelease]; to set an image in the navigation bar. This way it is centered automatically. Is there any way to have it left aligned ? ...

Recreating the Calendar "Day" View on iPhone?

I'm looking to show a Calendar in my application, just like the iPhone Calendar application "Day" View. The iPhone application has what looks like a Navigation Bar on the top (but doesn't perform Navigation). It has a + button to add a calendar event and possibly a left button to bring up the available calendars (if you have multiple ca...

How to verify if a delegate responds to a selector?

Hello, I know I need to write: [delegate respondsToSelector:@selector(myMethod:)] But the compiler is complaining that respondsToSelector is not a method in the protocol, which is correct, However I have seen many sample code use this, how do you do it?. Thank you. -Oscar ...

How to pass the value of a variable to the subview in iphone?

I am new to iphone development.I am creating you tube RSS feed.In the first table view i am displaying the title, published data and image in every cell.All these contents are retrieved from the XML page by XML parsing.I have also parsed and retrieved the description to be displayed and stored it in a mutable array.On clicking a row it ...

Since the iPhone MapKit doesn't allow geocoding (address -> lat/long), would it be allowed to query maps.google.com directly?

For example, you can make a request like http://maps.google.com/maps/geo?q=1600%20Pennsylvania%20Ave,%20Washington%20DC@&output=csv and simply get the response 200,8,38.8987480,-77.0366260 So I guess the only question is whether Apple would approve this in an app. Or is there a better way? ...

iPhone sqlite desc vs asc???

How come in my code when i use @"select Score from tblMed order by Score desc limit 10" everything works fine, but when I change "desc" to "asc" the scores don't show up??? ...