iphone

NSXMLParser crashing on faulty xmls, no correct error handling?

Hi Anyone else experiencing crashes deep down in the iPhone libraries when NSXMLParser parses an xml containing errors? I thought it was supposed to call: (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError but instead it crashes the entire app somewhere inside _xmlRaiseError. Is anyone else experiencing thi...

Detect when UITableViewCell goes out of scope

How can I detect when a UITableViewCell derived object gets removed from a table and into the cache? ...

Offline web application + ipad bug

I am trying to get a simple (all front-end) application working offline on ipad, but safari keep telling my that I am not connected to the internet. I uploaded my cache manifest, added AddType text/cache-manifest .manifest in my .htaccess I use 1 ajax request, BUT, I store it in localstorage and I check navigator.onLine, should it be ...

Why doesn't this for loop execute?

I have a picker view controller to select a chemical source and possibly a concentration. If the source doesn't have concentrations, it just presents a single picker. It gets populated by an NSDictionary with source type names as keys and a custom model object I made called Chemical that has four properties, two NSString, one float and...

NSDate Question

How do I create a NSDate of August 1, 2005? Found NSDateComponent on the internet, but seems too complicated. ...

Game with no levels possible?

Does a game need to have levels? Does having no levels put people off? I am working on a game where levels shouldn't be necessary, just the resources you have should put (reasonable) constraints. I used to play simcity and it purported to be open ended. However it has some arbitrary conditions forcing you to acquire some things before ...

Getting iPhone app to display one of two different views

I have a program where we are using a navigation controller and need the app to launch to one of two different views. Basically if certain info has previously been entered then we need the app to launch to view A, but if the info has never been entered then we need it to launch to view B. I am having difficulty getting this to work and a...

How to properly handle Core Data save errors wrt user experience on iPhone?

So, I have a basic app for storing, searching, and manipulating data. Basic CRUD operations. In various places of my code where I'm storing or updating this data, I basically have this: NSError *error; if (![self.managedObjectContext save:&error]) { // TODO: Handle this error NSLog(@"Error while saving data %@, %@", error, [error ...

Forcing location allowance on iPhone

If using CLLocationManager in your app, the first time a location update is made it will pop a question to the user asking for permission to use the location service. Now my app uses location, but not in the beginning of the app life cycle and when the user is not active with the phone. So I figure I have to get the allowance right from...

refactoring similar code targeted at all view controllers's navigation bar

Hello I'm trying to find the best way to refactor this. Right now, each of the view controllers (about 20 of them) have a function that initializes the content of the toolbar / navigation bar like so ie, -(void)toolbarInit and on each of the controller's viewDidLoad, you will see that the function is being called ie, [self toolbarIni...

Does anyone know about sensible tableview?

Have anyone used and can recommend to me a tool called sensible tableview for iPhone development? I have been hearing a lot about it lately so I've been wondering if anyone has any experience with it. Thanks. ...

iPhone SDK: Can I nab in instance variable from one view and access it in another?

I'm pretty new to OOP in general and just really started working with Obj-c a few months back. So, please be gentle! I appreciate your help in advance. Now to the question! I have 3 Text Fields where a user inputs name, phone, and email. I collect and place them in a label using an NSString like this [this is the one for the name]: - ...

UIToolBar on top of UITabBar?

When in the Camera Roll section of the Photos app, you can click the top right button to edit the photos. This replaces the bottom tab bar with three new buttons which are in a UIToolBar. I would like to do something similar, but I cannot get my UIToolBar to be on TOP of the tab bar. Is there a way to specify the layer order? Or do I...

Clang TOT, huh?

Hey, I wanted to try out some new features in Clang, and I was referred to Clang TOT. Now this might be an obvious question by what the heck is Clang TOT. TOT must be some acronym that I am not familiar with. Can anyone enlighten me? ...

Take screenshots of a UIView including 3 UITableView(visible+invisible) part

Hi, i have a UIView having 3 UITableView and need to take screen shot. But problem is invisible part of the 3 tables . Can anyone help to find a way to take screen shot of the whole view including complete scrolled contents of the tables. ...

"unrecognized selector" error. Cannot figure it out

I've been trying to get OAuth for Twitter to work on my iPhone application for the last couple of days, and I cannot for the life of me figure out why I'm getting this error. I've changed the way I've been approaching this for a while now, but still nothing. So I turn to SO to hopefully figure it out. The tutorial is linked here. Downlo...

Iphone SDK - Communicating between objects

In the below application you can see my current setup where the application launches and depending on whether the user is logged in or not a different uiviewcontroller is added as a subview of the main application [window addSubview:[loggedOutController view]]; My question is within -View1 (Login Screen), once the user attempts to login ...

iPhone: AVCaptureSession capture output crashing (AVCaptureVideoDataOutput)

I'm capturing video and converting it to a CGImage to do processing on it. It will work for a ~10 seconds, get memory warning and then crash (usually it says data formatters were temporarily unavailable). Can someone help me solve the problem? - (void) captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferR...

iPhone search bar design

I currently am implementing a search bar for one of my apps and I am having a problem with the indexed search overlapping it. I need to move the search field a little to the left so that way the index search is completely visible and not overlapping my search bar. I have tried a few things in interface builder but nothing is working. If ...

how to listen to button click for iphone as i want to display on and off png based on tap .

when i tap a button 2 images(image 1 and image 2(having ) are pop up now when i tap again i want to remove all but right now only button (i.e image2 in front) is only removed but not image 1 and i can remove image1 only when image 2 is removed how to delete all in 2nd tap and then pop again on 3rd tap - (void)touchesBegan:(NSSet *)touch...