iphone

PageControl Optimization

I'm developing for iPhone, SDK 3.1. I have about 150 images that I need to display to the user for him to page through. I've copied the code from the PageControl sample from Apple but once I load it onto the iPhone the application crashes if I scroll through quickly. I tried to write some optimization to conserve memory but it doesn't...

Retaining an authorization object

Right now I have my application executing some things using AuthorizationExecuteWithPrivileges. The problem is that it needs to ask for the password for every operation. Is there any way I could have it authenticate as soon as the app starts so that it won't ask for authorization later, and then release the authorization object when its ...

Dragging an UIView inside UIScrollView

Hello community! I am trying to solve a basic problem with drag and drop on iPhone. Here's my setup: I have a UIScrollView which has one large content subview (I'm able to scroll and zoom it) Content subview has several small tiles as subviews that should be dragged around inside it. My UIScrollView subclass has this method: - (UIV...

iPhone Application Breaks on an occurance of an even in between of UIImageView Animation?

Hello all, I have a situation where my code works perfectly fine on simulator but breaks while running on device. There are three screens to navigate. Oncliking a button on first one we navigate to second and on clicking second we navigate to third and on a button event of third we get back to root view controller that is first screen....

Why does 'self' protect memory space?

In a navigation based app, I initialize an array in my app delegate without using self. When accessed in the RootViewController's cellForRowAtIndexPath:, all array objects are there and I can see it is an NSCFArray. Once the app loads, I click a table cell and in didSelectRowAtIndexPath:, that same array has a type of NSArray, no object...

Maximum runtime memory available in iPhone and iPod?

Hello all, I am developing an applciation whose run time memory goes upto 6-7MB. When I run the application it works fine but sometimes it breaks on device or shows white screen instead of actual views. When I did some testing I came to know that it was triggering the didRecieveMemoryWarning event. Is it becoz of images, like I am usi...

Can't even install just xcode from iphone sdk on my Mac OSX 10.4

I'm trying to do the iphone sdk workaround for my Tiger Mac OSX and it seems that step one is just to install whatevr can be installed...well I can't even select my harddrive for destination because it's not Mac OS X 10.5 Any thoughts on why I can't even do this first step? ...

multitouch not working in uitabbar controller

Hi, I wrote a Simple View Controller with multi touch function (swipe left, swipe right). It works fine if I set it to window directly. But after I added a tab bar controller and add this Simple View in its selected view, the multi-touch event won't get fired any more. Please help. Thanks. ...

iPhone sdk - save a interger to NSUserDefaults

Does anyone know how I would go about saving my integer "HighScore" to nsuserdefaults so I can load and save the integer to it . Thanks. ...

Overlapping animations help!

Hi, Here is my code for making a bat flap its wings and respond to touches. - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { NSArray * imageArray = [[NSArray alloc] initWithObjects: [UIImage imageNamed:@"Bat1.png"], [UIImage imageNamed:@"Bat2.png"], [UIImage imageNamed:@"Bat3.png"], ...

Sample Login Application

Hi , I am newbie and i wanted to create a sample login application which accepts username name and password and validates the same after licking on a submit button. i have created userInterface screen and i wanted to do the validation and i am struck with that. i wanted to check if the username and password are same and if so display a...

Console won't print, only "...unrecognized selector sent to instance 0x####XX0" Runtime Errors

I'm working on an iPhone app (first real programming project) and I had two views that would go into tabs in separate applications to build them, where they work fine. Then I added them back into the main project; The tableviews bring on a crash with an numberOfRowsInSection] unrecognized selector sent to instance 0xXXXXXX so I isolated ...

Determine if UIViewController is closing due to application exit?

Is there a way to test in viewWillDisappear if it's being called because the application is exiting, versus normal ways of it being dismissed? The method applicationWillTerminate in the App Delegate is called after the current view is closed. I want to do different things depending on whether it's being dismissed due to a IBAction or t...

Best time/place to do cleanup in an iphone app

I have a typical RSS style application . I want to delete all the stories which are more than X days old, So that i dont keep filling up users HardDisk with old stories . Now, I am wondering what the best time and place for doing such clean up would be ? Is applicationWillTerminate in the app delegate right place to do it ? Also I thin...

IPhone - Setting NSString from array, double standards!

Hi, In the following bit of code, I'm setting the table view cell text with a value from the NSMutableArray 'categories' which is a property of my view controller. That works fine. But when I try the exact same code in another method, it crashes (it compiles without errors or warnings). If I change the following line in the didSelect...

Comparison between Corona, Phonegap, Titanium

I am a web developer and I want to move my web products to iPhone. One of the products is like Google Maps: show map on the phone screen, you can drag or resize the map and view some information that we add to the map. I know there are some technologies that enables you to use HTML, CSS and Javascript to develop native iPhone apps. I'v...

Frame load interrupted error while loading a word document in UIWebView

I want to load a word document using UIWebView. I used the code provided in http://developer.apple.com/iphone/library/qa/qa2008/qa1630.html to load the document. But not all the documents load successfully. Sometimes I get an error Error Domain=WebKitErrorDomain Code=102 UserInfo=0x145bc10 "Frame load interrupted" The error seems to ...

iphone app with multiple views/subviews: memory is not being deallocated

Hello I have an iPhone application that loads succesive views in a framework based on the one explained in this link (basically a main ViewController that loads/removes additional views with a displayView method). In my application I am using NIBs (the example link uses coded views) though so each of my ViewControllers has its accompany...

How do I implement a sprite-sheet in OpenGLES for iPhone?

I am working from the GLSprite sample code example. What I want to know is what do I need to do to the code to have it treat my texture as a sprite-sheet? The only modification I have done so far is to create a 256 x 256 png of 16 smaller images to be my frames. I have never worked with sprite-sheets before. Thanks for your help. ...

How to get USA states programatically?

I am developing an iphone application in objective c. I have to get the list of the states of USA programatically. How can I get that list? ...