apple-ios

How much RAM is there in an iPhone?

Different iPhones have different published memory 4GB, 8GB and 16GB. The touch can have 32GB. My understanding is this is the off-line memory (disk alike). How much actual fast ram is there in the device available for my Cocoa Application? Is there a preconfigured virtual amount? ...

iPhone SDK: problem managing orientation with multiple view controllers.

I'm trying to build an iPhone application that has two subviews in the main window. Each view has its own UIViewController subclass associated with it. Also, within each controller's implementation, I've added the following method: -(BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation { ret...

What does "NS" stand for in Cocoa class names?

Possible Duplicate: What does the NS prefix mean? I'm relatively new to iPhone OS development, and I see NS all the time in various class names, but have yet to come across an explanation for the meaning? Examples: NSObject NSString NSArray ...

What's wrong with how I'm using NSDateFormatter?

NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; dateFormatter.locale = [[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"] autorelease]; [dateFormatter setDateFormat:@"EEE, d MMM yyyy HH:mm:ss zzz"]; NSString *dateString = @"Tue, 08 Jun 2010 17:00:00 EDT"; NSDate *eventDate = [dateFormatter dateFromStrin...

What are the implications of multi-tasking in iOS 4.0 for developers?

I just watched this video from Apple that shows multi-tasking on the new iPhone (running iOS 4.0). What are the implications of multi-tasking to developers? Include both positives and negatives. For example what happens if the user decides to launch two resource-intensives apps at the same time, one of the apps crashes and progress in...

measure rendered html in javascript without affecting the measurement

I am doing pagination in javascript. This is typographic pagination, not chopping up database results. For the most part it works, but I have run into a heisenberg issue where I cannot quite measure text without affecting it. I am not trying to measure text before it is rendered. I want the actual position it shows up at on screen, s...

iPhone 4.0 SDK UIWebView crashes with DOMHTMLElement error..

My app have an UIWebView and I open a twitter oauth page with it. when I open oauth page , it works well. after I sign-in, it redirects to another page which have PIN code. and It crashes down with logs below. Is it a bug in 4.0 SDK? 2010-06-14 22:55:11.159 AllFx[1435:2003] -[DOMHTMLElement setHref:]: unrecognized selector sent to i...

can a uiviewcontroller push a uitabbarcontroller?

if so, how do i setup my uitabbarcontroller in IB? all the examples ive seen create the uitabbarcontroller in the app delegate. ...

touchesBegin & touchesMove Xcode Obj C Question

So I have my app working good when you press and drag along. I also have UIButtons set to Touch Down in Interface Builder. As well when you drag you need to drag from the outside of the UIButton. You cannot click on the UIButton and drag to the other. TOUCHES MOVED: Code: -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)even...

iOS - Rotating view reveals background.

Hi, I have created a view that I want to be able to rotate. The two views are: containerView and this has a .backgroundColor of red and BackgroundImage as a subview. Here is my code for rotating: - (void) willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { [self adjustVi...

How to port a simple application (which uses only standard libc) to iPhone OS ?

There is a simple application written in C, which includes only standard C library functions (from stdio, stdlib, etc.) and Makefile+GCC to build it. Now, I wanna port it to iPhone OS for iPhone/iPads. Will it be seamless or are there any possible incompatibility issues? ...

Table cell in a split-view controller - selected cell becomes deselected when called by reloadData

I'm working on a universal app that uses a SplitViewController to present a master-detail view. In the iPad HIG on Split Views, Apple states: In general, indicate the current selection in the left pane in a persistent way. This behavior helps people understand the relationship between the item in the left pane and the contents of the...

How can I put the MPMediaPickerController cancel button on left side?

I'm developing an app and so far all cancel buttons have been on the left side of the navigation item. I thought this was standard and that's what Apple do with their apps. That is until I ran into the MPMediaPickerController which has it's cancel button on the right side of the navigation item. Is there anyway I can move this to the l...

Core Data fetch request fails with: 'NSInternalInconsistencyException', reason: 'statement is still active'

Basic app layout using the navigation controller template with core date: Delegate: persistenceCoordinator, managedObjectModel, managedObjectContext RootView: managedObjectContext (from delegate), addManagedObjectContext (using the pattern from the templates), fetchResultsController Add/Edit view (a hierarchy for adding Object A & it...

Display view controller's view using custom animation iOS

Hi, I have a button that, when pressed, presents a view controller to the user. I currently do this using a method like this: ProjectViewController *myProj = [[ProjectViewController alloc] init]; myProj.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; myProj.modalPresentationStyle = UIModalPresentationFullScreen; UINavigati...

UIDocumentInteractionController - our own app shows up in list

Our app can deal with say Pages files as an example and needs to both hand off files to other applications as well as receive files from other applications. So we edit the plist CFBundleDocumentTypes to say that we can deal with Pages files. ('Default') mode. When the user wants to send a .pages file onto another application (Likely t...

UINavigationController crashes due to a NSArray variable

I push a view controller into current navigation controller. It works fine, except when I am getting out of the current view controller, it crashes. MyTableView *newPage = [[MyTableView alloc] initWithNibName:@"table2" bundle:nil]; [[self navigationController] pushViewController:newPage animated:YES]; //[newPage release]; I comment ou...

Can a UILabel be placed over UIPicker component and the text of the UILabel be updated after user picks a new value in the picker?

How are the user's touches detected if i were to use UILabels that are overlayed on each picker component? I understand how to detect the user's touches on the picker, but I need to update the text of the label after the user make changes a picker component value. My method is not being called after I change the values in the picker comp...

MPMoviePlayerViewController Black Screen issue!

I have this code trying to run a video on the iPhone 4 Simulator. The problem is that looks like it loads the player but half a second later loads a back screen on top of the whole application disabling touch and everything, and it looks like it does not play the video also, because I can't hear anything. Any ideas?! MPMoviePlayerView...

Google Analytics within iPhone SDK 4 Built App

Three questions for iPhone developers using Google Analytics within their apps for tracking use of their apps: Will using Google Analytics cause us to be in breach of the terms and conditions of the Apple SDK 4 for developers? If the answer to #1 is YES, then what are we -- as iPhone developers -- allowed to use to track usage of our a...