iphone

Why I can't draw something on my UIView?

This is my Main View, I just want it draw some thing to test, but I find that my UI don't have any thing, here is the code: - (void)viewDidLoad { [super viewDidLoad]; CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetLineWidth(context, 2.0); CGContextSetStrokeColorWithColor(context, [UIColor redColor].C...

Can't find the leak in this Objective-C NSXMLParser code?

I am new to iPhone programming, and am running my app against the Leaks tool in Instruments. The tool is finding a few leaks, all of which seem to point to 1 line of code in a class which uses NSXMLParser: - (BOOL)parse{ NSURL *url = [[NSURL alloc] initWithString:@"[url here]"]; NSXMLParser *parser = [[NSXMLParser alloc] initW...

How to sort a mutable array with reference to Date which is saved as "object for key" in iphone?

I am new to iphone development .I have mutable array recent in which the values such as title,date,url and summary are stored as " object for key".The keys are myurl,mudate,mytitle,mysummary.I want to sort that mutable array in reference to date and print all the values according to that..How can i achieve that?Please help me out.Thanks....

syntax highlight with objective-c

Hi Guys, i'm looking for a objective-c class that supports syntax hightlighting a string. is there something like that existing? this should work on iphone! ...

Moving Between Multiple XIB Files

Hi, It's my understanding that in order to move between xib files one usually uses either a Navigation Controller, Tab Controller, or Flipside Controller or combination of them. But my question is- can I write my own custom controller, and use Core Animation to move between Views or are these default controllers (navigation/tab/flipsid...

Hold "shared" views in app delegate or in root view controller? (iPhone OS)

Say I have two views: "day view" and "week view". In the week view, tapping on a day opens the day view for that day. I have a root view controller with two buttons: one leading to a day view for today, the other to the current week view. I want to be able to push any one of the view controllers on the UINavigationViewController's stack...

iPhone Quartz Demo, rerender PDF

Hi guys, How should I modify the QuartzDemo that comes with the iPhone so that it re-renders the PDF view like UIWebView does when you zoom in? Cheers Nik ...

Pairing 3 or more iPhone with bonjour

Hi All, I'm working in a game and one of its features is to let the user play with players near him. I know that if I show a dialog to the user for choosing between to be a server or a client it's easy to pair 2 or more devices. However, I think I can do a little better work if I don't show the dialog to the user (most of them don't kn...

Is it possible to create a system that will receive SMS messages with a location in the title and automatically transfer that information into Google Maps?

I'm looking at building a simple app based around location. Obviously given that lots of people don't have access to smartphones etc, I'm trying to figure out a way to allow them to text in their address/location details to an automated system that will locate them on Google Maps. Is this possible? And if it is possible, is it possible t...

How much memory can an iPhone app use?

Can anyone link me to a page that describes memory allocations for iPhone apps. I have heard that you are limited to a sandbox of ~20 megs, depending on the state of the phone, but I can't find the source for this. ...

Can I install iphone application developed in iphone sdk 3.1.3 on iphone3.0?

Hi everybody, I am having unlocked iphone 3.0 which I want to use for the development purpose. But my problem is I have iphone sdk 3.1.3 installed on my mac. So can I install iphone application developed in iphone sdk 3.1.3 on iphone 3.0.... Can anyone help me with this..... Thanx in advace...... ...

iphone sdk - detect user or light input

I'm writing a little application and have fallen at the first hurdle nearly! I wanted to have an action happen when the light level dropped below a certain threshold. I've since found out you cannot access the light meter in the SDK, so I am thinking of another way of doing it. (I assume I am correct in saying you cannot detect the lig...

Is this possible with the Navigation Controller?

I'm using the navigation controller project. I'd like to have a main menu without the Navigation Controller bar. But other screens SHOULD have the navigation bar. I did this by setting the viewDidLoad in my RootViewController to: self.navigationController.navigationBarHidden = YES; And inside viewDidLoad in my childController to: se...

Managing App Users/Groups in a iPhone App

Hi All, I'm looking at managing user groups in an iPhone App. The App is connected to a WebServer. I'm therefore looking at using ASP.net Membership Provider to store/manage User Info. (We may just make a simple custom table to manager end users). I have not seen a native User Management framework in iphone SDK. Anyone have a better su...

Where can I find the source of the open-source Wikipedia iPhone application?

Where can I find the source of the open-source Wikipedia iPhone application? ...

iPhone ad-hoc distribution howto?

Hi, how do I do an ad-hoc distribution profile? Been reading many links but I think there is something that I'm still missing. Just can't figure out what. Here are the steps that I took 1. a team member sent me his UDID 2. I add his phone to "devices" under the dev portal Then this is what I did to create the ad-hoc profie 1. go to ...

How can I determine the default gateway on iPhone?

I need to obtain the IP address of the default gateway in an iPhone application. I cannot find the proper API. Anyone know if iPhone exposes this information? ...

Is there a way to save iPhone app data (export it and import later for testing?)

Suppose we are doing a big change and require user to run some migration code from version 1.0 to 2.0. The migration will make changes to data in userdefaults, files and other persistence methods. What is a good way to just export all the app specific data (in the device or simulator) and be able to import it back later so we can run mul...

Reading Cocoa (not Cocoa Touch) archives on iPhone

If I have a file that was written by Cocoa on a Mac, using NSKeyedArchiver, are there any tricks to reading it on iPhone OS? NSKeyedArchiver exists on both platforms, but the Mac version might archive an NSColor, and iPhone can only unarchive UIColor. There’s setClassName:forClass: but I don’t think that helps. I don’t think it’s liter...

iphone/cocoa custom ui element

Hi guys I'm very interested in using the typical mac 'tag' element in an iphone app (see specimen 1 - The Blue round element'). I dont really have any idea of how to implement it except for copying the color and making it a uibutton. I would like to be able to drag this tag from one 'section' to another 'section'. Can someone point me...