iphone

How can I get an array of the indexes from another array that has been sorted?

I want to sort an array by its objets and then get the indexes like so: NSMutableArray *myArray = [[NSMutableArray alloc] initWithObjects: @"3", @"2", @"1", @"0", @"1", @"2", nil]; I want the indexes of the objects in ascending order. Here, because the lowest value has an index of 3, the indexes would be would be: 3, 2, 4, 1, 5, 0 or ...

iPhone: error in UIViewController interface declaration (expected '=', ',', ';', 'asm' or '__attribute__' before 'interface')

I have been working on this iPhone app for quite a while and everything has been working fine, but now all of the sudden, I am getting this error in a file I don't remember editing (nor do I remember editing anything relating to it, but it's possible.): /Users/on_fire/BWOC 0.5/Classes/../BrowserViewController.h:29: error: expected '=', ...

Accelerometer get me 0000 all time

I get 0 0 0 0 0 0 0 0 0 0 0 0 - (void)applicationDidFinishLaunching:(UIApplication *)application {resultValues.text = @""; [[UIAccelerometer sharedAccelerometer] setUpdateInterval: 1.0 / kUpdateFrequency]; [[UIAccelerometer sharedAccelerometer] setDelegate:self]; } - (void)accelerometer:(UIAccelerometer*)accelerometer didAccel...

Reason for iPhone rejection listed anywhere?

Just checked the status on one of my iPhone applications and noticed it was rejected. However, due to complications the email account I have on the account is unavailable. So, that leaves me with absolutely no clue as to why the app was rejected. Is anyone aware of any areas on apple's site that allows you to research why a specific a...

Pass anything except sender in IBAction?

In my view controller (viewDidLoad) I am populating an array defined in the view controllers header file with settings data (from an archive). I am using data from the array to write labels on buttons in the view, no problem so far. I would like to pass one element of the array through an IBAction to add to the new view controller. I ke...

iPhone: Why does applicationMusicPlayer quit playing when app enters background?

I made a little test app to try to isolate this issue, but it exhibits the same behavior: the applicationMusicPlayer stops playing immediately when the app enters the background. I don't know what I'm doing wrong, or if it's an Apple bug. It seems so simple that if it were an Apple bug others would have encountered it and posted on it. ...

linking a button to a certain sound in xcode?

I'm using avaudioplayer and want to add a button to play the sound but i'm not sure how to. Here's current code: #import UIKit/UIKit.h @class AudioPlayerViewController; @interface AudioPlayerAppDelegate : NSObject <UIApplicationDelegate> { UIWindow *window; AudioPlayerViewController *viewController; } @property (nonatomic, re...

Is there any performance penalty for using multiple CLLocationManager instances

I have at least two controllers in my app that currently use their own CLLocationManager instance. I'm curious however if using multiple instances actually imposes any additional burden on the phone - beyond the additional memory for the different instances. Will the iPhone ping the GPS hardware multiple times, or does it use some sort...

iPhone - vectorial format for iPhone/iPad

What is the best vectorial format I can use to create resolution independent vectorial artwork for iPhone and iPad? PDF? I have to draw large images 1024x1300 images on a quartz context. Suppose I use PDF. What technique would save more memory and consume less CPU: have the PNG image loaded and draw it on the quartz context or have the ...

iPhone Choking on Certain Image Formats

My app allows upload of an image from the camera roll. Some images are causing the app to crash when I attempt to save them to my documents directory prior to upload. I'm converting the image to a PNG prior to saving, but that hasn't helped. Here's the error... Tue Aug 31 20:39:13 localhost XXX[76409] <Error>: CGBitmapContextCreate: ...

Possibilities for transferring image with text

I went thru StackOverflow for finding out different solutions for sending/fetching images along with text via iPhone apps. There are few options like: 1-Sending content via Email to other email address(Just like iphone app,POSTAGE do) 2-Sending/Receiving in-app SMS but that is only supported in iOS4 3-Use some intermediate Server to s...

rotation based on center of UIView is not working?

hi i have coded in applicationdidfinish method as [m_tabViewController view].frame = CGRectMake(0,15, 768, 90); [m_tabViewController view].center = CGPointMake(670, 0); [m_tabViewController view].transform = CGAffineTransformMakeRotation(degreesToRadians(315)); [window addSubview:viewController.view]; [window addSubview:[m_tabViewCont...

Objective C - Iphone: Image constant?

Is it possible to have an image as a constant in Objective C for iPhone development? ...

How can I use MailComposerViewController in an OpenGL ES based iPhone app?

I'm adding a "Tell a friend" feature to an OpenGL ES based iPhone app. When the user taps a "button" (something drawn using OpenGL... not something from Interface Builder) I want to present a pre-populated email composer. How can I do this? I'm currently trying to use MailComposerViewController from the Apple sample code. I just don'...

Core Animation difficulties with spinning dial control (very detailed)

Im trying to create a spinning dial control, basically a set of 6 digits that spin around and around to give the effect of a spinning number meter (similar to your power/water meters, or perhaps a poker machine, in fact very similar to the existing UIPickerView control, but with a completly different look and feel). So far, I almost hav...

Query on UIWebView

Hi, Can anyone point me some good examples on how to use UIWebView in iPhone. ...

What is the easiest way to incorporate the iPhone's default Photo Album into a custom app?

Is it possible to simply incorporate the iPhone's Photo Album in a custom application in the same way it is done within the default camera application? If so, how? I know I can use the ALAssetsLibrary and what not to create my own Photos Album ... but there isn't anything I want to customize. I just want the same capabilities that you...

How to create WiFi popup login page

When I go to a place with a WiFi hotspot (such as Panera Bread) and connect with my iPhone, the hotspot login page appears as a popup. That is, no matter what app I'm running or what web page I'm on, the login page scrolls up from the bottom, asks for my login credentials, and then disappears. But at some other hotspots, I don't get the...

MKMapView zooming and scrolling locks on device with callout open , not on simulator.

Hi , Facing some strange problem. MKMapView zooming and scrolling locks on device with callout open , not on simulator. The locking is in the sense that if u try to zoom in or out, it zooms back user to same zoom level where it originally was similar, when tried to scroll in the map , it bring them back again. This does not happen i...

Configure IPhone settings Programmatically..........

I have been developing an app where i need to configure the IPhone settings programmatically like SMS,MMS,Voice & Data. Over settings page I need to set the limits for SMS, MMS , Voice & Data, so that user cannot use it more than that...... Main thing is to set the limits for all of above ...I googled alot & didn't find any kind of hel...