iphone

memory leaks appearing after multiple loading

Hi everyone I have an, at least to me, strange case here: I have a relatively simple program which loads an XML file from the web, parses it and write the data into an array of dictionaries. Each dictionary represents a row in the table. The program works fine and if I attach my simulator to instruments and load the list, there is no me...

Adding an object with "text"

Hello, I'm stumped or just not finding info I need, I have an object that I want to save in an array when they select "saveDataround" button, however I can't seem to figure out how to populate the object with the text "Round": I'm getting an "Expected identifier" and "Expected , ;" errors on the first and second lines of code. Thanks in...

how to create multiple pages in Xcode iphone apps

Hi there, i am starting my experience with iphone sdk. and i have a question, which is i am trying to create two pages to the app but i don't know how to link them or design them. like when i start the Xcode i find one page named View to design in it, i want to make that page a welcoming page then the user choose one of the three choices...

Dereference (release?) NSMutableArray

Hi Guys, in my class i have a NSMutableArray declared and used. One of the methods of this class however needs to clear the entire array and add new set of objects into it. What would be the best approach to clear it out and add new objects to it from scratch? regards peter ...

class/lib for parallel donwloads on iphone

Hi there! I need some class or lib that would allow me to run multiple parallel downloads. I didn't have luck finding any, do you guys know about something useful? I need to add new files to download dynamically, so something that only get initialized with urls at the beginning won't help me much. Any help would be greatly appreciated....

How do I hide the textfield cursor on the iPhone?

How do I hide the textfield cursor on the iPhone? ...

Make a "Merged copy" of a CALayer composition.

I know it has answered here, but I cannot get it work. I have some puzzlePiece CALayer subclass instance, each with 4 additional sublayer. When user manupulates a piece, its sublayers get changed. But after manipulating finished, user can only move these pieces. I want to make somehow a "snapshot" of the sublayers after user finished m...

What's the best way to store and retrieve multi-dimensional NSMutableArrays?

I'm storing a bunch of data in a .plist file (in the application documents folder), and it's structured like this: Dictionary { "description" = "String Value", "sections" = Array ( Array ( Number, ... Number ), Array ( Number, ... Num...

IPhone Playing sound over a phone call

I would like to be able to play a sound file during a phone call so the person at the other end of the line can ear it clearly. I know it is possible to play sounds on the line but i can't figure out how to cut the microphone at the same time so the person at the other side of the line don't ear ambiant noises.. Does someone knows how...

Iphone View explanation in detail (View, Superview, etc)

Hey, I'm looking for an in-depth breakdown/explanation of the iphone's view usage. Like, what controllers have what types of views, how they relate (child <> parent), how they can be nested, added and removed, etc. Preferably something with some pictures would be nice too (I'm a visual learner). But yeah, in-depth, technical, explana...

Accessing a MKMapView through the tab bar

I have a tabbar application and on the first tab I have a MKMapView. What I want to do is from somewhere else in the application, switch the active tab to the mapview and set the mapview's region based on the data in the previous view (the one with the button to switch to the mapview). What I've tried is: [self.tabBarController setSele...

viewWillDisappear firing before UIApplicationWillTerminateNotification

If I add an observer for UIApplicationWillTerminateNotification in a UIViewController, it fires after viewWillDisappear. I have some code in the viewWillDisappear that needs to take a different action based on weather or not the application has been terminated or simply unloaded. Can anyone suggest what could be done in this situation ...

How to receive UIAccessibilityNotifications in iPhone App

I'm interested in capturing UI changes in my application programmatically and thought that the UIAccessibility protocol may help. I've found how to post UIAccessibilityLayoutChangedNotification and UIAccessibilityScreenChangedNotification but I'm not sure how to register to receive these notifications. I've tried using NSNotificationCen...

Why is a UITabBar considered Modal?

Reading the Apple documentation on the UITabBar states, The most common use of a tab bar is to implement a modal interface where tapping an item changes the selection. With my definition of Modal being: A modal view is one that has to be dismissed before you can do anything else. But that's not always the use case. I...

MKMapView tile-based overlay

I want to draw a tile-based overlay on top of a MKMapView, but there's no obvious way to do this. This appears to be tricky since you can zoom to any level with MKMapView (unlike Google Maps). Has anyone attempted to do this? ...

What's the right memory management pattern for buffer->CGImageRef->UIImage ?

I have a function that takes some bitmap data and returns a UIImage * from it. It looks something like so: UIImage * makeAnImage() { unsigned char * pixels = malloc(...); // ... CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, pixels, pixelBufferSize, NULL); CGImageRef imageRef = CGImageCreate(..., provid...

How to create a MobileSubstrate Plugin for iPhone?

Hi there. i have googled alot on how to create a mobilesubstrate plugin for iPhone but couldnt get any basic tutorial for that. Anybody having any knowledge of how to do this? I am looking for a basic understanding of it. Thanks :) ...

iPhone unit test linking problem, can't find DevToolsBundleInjection.framework

I'm trying to setup application unit tests for my iphone app. So I made a copy of the app target, and a unit test bundle target as described in apple's documentation (http://developer.apple.com/iphone/library/documentation/Xcode/Conceptual/iphone_development/135-Unit_Testing_Applications/unit_testing_applications.html) After following A...

iPhone View-Based Application Doesn't Have Core Data?

In Xcode, I'd like to go File -> New Project -> and pick View Based Application. But it doesn't have the "Use core data for storage" (like some of the other projects). So I can't assign a core data to it. I'd like to know if this is an issue, and what's the best route to take for what I'm trying to do? (Which is build a core data based...

Save the current status when quit, auto-reload when re-open the app

Hi, I'm creating a simple app to simply save a person's name and a number associated with this person. I've created a class for person like this: @interface Person : NSObject { NSString *name; NSInteger serialNumber; } In the mainViewController, I've created an input text field to enter the name and then automatically assign a...