iphone

NSZombieEnabled breaking working code?

I have the following method in UIImageManipulation.m: +(UIImage *)scaleImage:(UIImage *)source toSize:(CGSize)size { UIImage *scaledImage = nil; if (source != nil) { UIGraphicsBeginImageContext(size); [source drawInRect:CGRectMake(0, 0, size.width, size.height)]; scaledImage = UIGraphicsGetImageFromCu...

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 ...

UITableView Header View Scrolls

I am using a header view, not section header, with my UITableView. The documentation says that the header view sits on top of the table, but my header view scrolls just like a normal row. Is there a way to make the header view always visible at the top of the table? ...

How can I test my iPhone app on earlier than SDK 3.0 simulator, make sure it work?

Hi Stackers! I wrote iPhone application. Very simple! It use Cocos2D only, and all other features is very basic, no accelerometer, no camera, nothing. Just buttons and sounds. I think every iPhone can run this app (there is no limits on Cocos2D right?), but my XCode only let me use 3.0 and upwards. I want to confirm 1 thing and ask one...

NSFetchedResultsController not processing certain section driven moves

I utilize a NSFetchedResultsController (frc) with a Core Data store. I implement all the frc delegate methods. The table is sporadically updated by background threads. All the inserts, deletes and updates work fine, with the exception that updates to the frc's index key for rows toward to the bottom of the table (50 rows), do not result ...

UIView as dictionary key?

I want to have a NSDictionary that maps from UIViews to something else. However, since UIViews do not implement the NSCopying protocol, I can't use them directly as dictionary keys. ...

How to accommodate for the iPhone 4 screen resolution?

This is a programming question! Read on before you vote to close! According to Apple, the iPhone 4 has a new and better screen resolution: 3.5-inch (diagonal) widescreen Multi-Touch display 960-by-640-pixel resolution at 326 ppi This little detail affects our apps in a heavy way. Most of the demo apps on the net have one thing i...

iPhone SDK: path and Inner Shadow

Take a look of this image: http://imagebin.ca/img/b-W91wDU.png I have some CGPath like the image 1 and I would like to know how I can create an inner shadow effect like the image 2 I'm working with objective-c and Core Graphics iPhone SDK: 3.2 ...

how to use XML in Sdk for web base application ?

hi every one I'm want to know how's correct way to use Xml in sdk for web base application i'm trying to do magazine in iphone but they told me that i have to use XML to take body and other thing from that web site? please some one direct me to that and if you have any tutorial for that thanks ...

IPhone application in HTML 5

Hi Experts, I have got a assignment to develop a IPhone application in HTML 5 & I really don't have any idea from where I have to start. Please let me know which editor I have to use to develop IPhone application in HTML 5. also, as I am a pure .NET developer, what other skills I need to write the program in HTML 5. Thanks in advance....

iphone application communicating with a java servlet on a WebSphere.

Hello, Here is a Generic question: I wish to build an iPhone application that will communicate with a Java Servlet installed in a webSphere, my iPhone application will ask the servlet to perform some SQL queries in the connected DB, and will receive the answers accordingly. Please help to understand the following questions: How shou...

Why isn't my ScrollView/CATiledView zooming properly?

I have a UIScrollView backed by a CATiledLayer. The layer is pulling tiles from a server and displaying them in response to what is requested when drawLayer:inContext is called. Here's what it looks like: -(void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx{ ASIHTTPRequest *mapRequest; WMSServer *root = self.mapLayer.pa...

Memory Leak when using SDURLCache (subclass of NSURLCache)

I am using Olivier Poitrey's SDURLCache (github link) as an alternative to NSURLCache to enable disk-caching in an iPhone app. It works very well but is curiously leaking a NSHTTPURLResponseInternal when a disk cached object is returned (no leak when object is returned from memory or no object found). The following code snippet shows ho...

What's the name for properties which are not managed by core data?

Would I say "unmanaged" property? Is there a special name for this? (talking about subclasses NSManagedObject with additional properties that are not in the data model) ...

How to write a value validation method for core data?

The docs say: you should implement methods of the form validate:error:, as defined by the NSKeyValueCoding protocol so lets say I have an attribute which is an int: friendAge I want to make sure that any friend may not be younger than 30. So how would I make that validation method? -validateFriendAge:error: What am I gonna do...

iPhone app memory leak with UIImage animation? Problem testing on device

I have an animation which works fine in the simulator but crashes on the device. I am getting the following error... Program received signal: “0”. The Debugger has exited due to signal 10 (SIGBUS) A bit of investigating suggests that the UIImages are not getting released and I have a memory leak. I am new to this so can someone tell m...

Losing NSManaged Objects in my Application

I've been doing quite a bit of work on a fun little iPhone app. At one point, I get a bunch of player objects from my Persistant store, and then display them on the screen. I also have the options of adding new player objects (their just custom UIButtons) and removing selected players. However, I believe I'm running into some memory ma...

Views jump during ViewDidLoad

Hi, I have a custom button, subclassed from UIButton that is initialised as below (obviously all the button does is use a custom font). @implementation HWButton - (id)initWithCoder:(NSCoder *)decoder { if (self = [super initWithCoder: decoder]) { [self.titleLabel setFont:[UIFont fontWithName: @"eraserdust" size: self.titleLabe...

Designing for varying mobile device resolutions, i.e. iPhone 4 & iPhone 3G

As the design community moves to design applications & interfaces for mobile devices, a new problem has arisen: Varying Screen DPI's. Here's the situation: Touch: * iPhone 3G/S ~ 160 dpi * iPhone 4 ~ 300 dpi * iPad ~ 126 dpi * Android device @ 480p ~ 200 dpi Point / click: * Laptop @ 720p ~ 96 dpi * Desktop @ 720p ~ 72 dpi There ...

Updating a deallocated UIWebView from a background thread

(Two edits follow the original body of this question, both of which modify the question pretty radically. Don't get hung up on the first part of this--while useful for contextual purposes, I've all but ruled out the original problem I was asking about.) As you can see from the title, I've programmed myself into a corner and I've got sev...