iphone

Explain please download file iphone

hi all ! i want to download plist from my server usibg http:// i have searched the web and everybody says use that class or that one ... but no example on how to do this. may be it is really simple but i'm a noob so if someone can explain or give a link he'll be my heroe thanks to all !!! ...

Rotate using a transform, then change frame origin, and view expands??

This is quite the iPhone quandry. I am working on a library, but have narrowed down my problem to very simple code. What this code does is create a 50x50 view, applies a rotation transform of a few degrees, then shifts the frame down a few times. The result is the 50x50 view is now much larger looking. Here's the code: // a simple 5...

Shifting UITableViewCell Content to the right

Is there a simple way to shift cell content to the right? Like a horizontal alignment or some sort of offset? I'd rather not include a blank cell.imageView.image, or add spaces to each cell.textLabel.text. Any ideas please. Thanks. ...

Cannot play a recorded sound on device.

I'm using the exact code from the iPhone Application Programming Guide Multimedia Support to use AVAudioRecorder to record a file to the disk and then AVAudioPlayer to load and play that file. This is working fine in the simulator but is not working on the device. The file gets loaded (we can see the NSTimeInterval) but does not play (...

Multiple View application and Navigation Bar

Hi. I'm working in a iphone view-based application. The application works this way: First view is a welcome view with buttons for load other views. Second view is a map that shows the location using gps. Third view is a search engine that loads some information to show on the map and on a list (This has two button to load map or table). ...

How to take a screen shot of an app (within an app)? (iPhone)

So what if I want to make an app where you can take a screen shot within the app itself. How would I do that? So for example the users click a UIButton and it takes a picture of the screen. ...

Popover with embedded navigation controller doesn't respect size on back nav

I have a UIPopoverController hosting a UINavigationController, which contains a small hierarchy of view controllers. I followed the docs and for each view controller, I set the view's popover-context size like so: [self setContentSizeForViewInPopover:CGSizeMake(320, 500)]; (size different for each controller) This works as expected ...

how do i disable a certain javascript on iphone/ipad or other mobile devices?

I got this for IE browsers, var IE = /*@cc_on!@*/false; if (IE) { // IE. } else { // Others. } but how would i do the same for iphone/ipad/mobiledevices? (do not want to redirect to another page on any mobile devices) ...

Storing CGImage in Photos app?(iPhone)

Hi, lets say I have a CGImage and want to store it in the Photos app that comes standard with every iPod Touch/iPhone how would I do this? ...

Get name given by phone number on the iPhone

I'm using a TextField where the user types a phone number. When the TextField changes, it should check if this number is already in the phonebook and display the name. So far, my only way is to parse all names and number in a Dict and read it from there. Is there a simpler, more efficient and sophisticated way to do that? ...

Why is my UITableView not being set?

I checked using the debbuger in the viewDidLoad method and tracerTableView is 0x0 which i assume means it is nil. I don't understand. I should go ahaed say yes I have already checked my nib file and yes all the connections are correct. Here is the header file and the begging of the .m. ///////////// .h file //////////// @interface T...

Starting an app when iPhone turns on?

I don't care if its something Apple wont accept but, how would I get an iPhone app to start up when the iPhone turns on? ...

What's the best way to have functions share an array in Objective-C?

I understand that in Objective-C you declare an array in the header file and interact with it in a class. So far I'm adding things and fetching them fine within a single function. I'm new to the language however and can't figure out how to share that array across other functions. I'd like to initialize array data in my viewDidLoad and a...

Why I got a "sent to freed object error"?

I have a Table View, and CharTableController, the CharTableController works like this: .h: #import <Foundation/Foundation.h> @interface CharTableController : UITableViewController <UITableViewDelegate, UITableViewDataSource>{ // IBOutlet UILabel *debugLabel; NSArray *listData; } //@property (nonatomic, retain) IBOutlet UILabel *...

NSArray vs. SQLite for Complex Queries on iPhone

Developing for iPhone, I have a collection of points that I need to make complex queries on. For example: "How many points have a y-coordinate of 10" and "Return all points with an X-coordinate between 3 and 5 and a y-coordinate of 7". Currently, I am just cycling through each element of an NSArray and checking to see if each element m...

iPhone multitouch - Some touches dispatch touchesBegan: but not touchesMoved:

I'm developing a multitouch application. One touch is expected to move, and I need to track its position. For all other touches, I need to track their beginnings and endings, but their movement is less critical. Sometimes, when 3 or more touches are active, my UIView does not receive touchesMoved: events for the moving touch. This probl...

NSKeyedUnarchiver chokes when trying to unarchive more than one object

We've got a custom matrix class, and we're attempting to archive and unarchive an NSArray containing four of them. The first seems to get unarchived fine (we can see that initWithCoder is called once), but then the program simply hangs, using 100% CPU. It doesn't continue or output any errors. These are the relevant methods from the matr...

Core Plot: how to draw custom logic according to user touches?

I want to draw some additional lines and labels according to user touches. In CPTestAppScatterPlotController.m - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event and other similar methods not handled. Where I should add custom drawing logic accorfing to user touches? ...

How to access the CGColor property of UIColor in CGContextSetFillColorWithColor?

CGContextSetFillColorWithColor(g, [UIColor greyColor].CGColor); I'm trying to follow O'Reilly's iPhone Game Development book on page 73 Chapter 3 but I'm running into a compile error that states error: request for member 'CGColor' in something not a structure or union According to the book's errata page this is an unconfirmed errata ...

How to let the sortedArrayUsingSelector using integer to sort instead of String?

I have some data like this : 1, 111, 2, 333, 45, 67, 322, 4445 NSArray *array = [[myData allKeys]sortedArrayUsingSelector: @selector(compare:)]; If I run this code, it sorted like this: 1, 111, 2,322, 333, 4445, 45, 67, but I actually want this: 1, 2, 45, 67, 111, 322, 333, 4445 How can I implement it? thz u. ...