I am implementing a class that has to store arbitrary objects together with a string. i.e.
myUIViewObject, @"that's a nice view"
myUIViewController, @"not really special"
myOtherObject, @"very important one"
this list can be extended and modified at any time, so I thought about using NSMutableDictionary here. But I am not really sure....
I'm new to Objective C, and Mac development... It appears that I can use the Posix threads API in my app.. Is this the recommended way? Or is their some Apple API I should be using for mutexes, condition variables and threads instead?
I should add that I'm developing for the iPhone.
I'd like to add exactly what I'm trying to do. Basica...
I have briefly described the working of my application to under stand my Question.
I have an application, in which more than 1600 images are stored with in iPhone-Application-Document Directory.
I have a tableView on Main Screen as follows.
=>First Category
=>Second Category
=>Third Category
=>if user selects First category, Images are...
I am not sure if the memory address of an object keeps beeing the same over its lifetime. Does it? Or does it change sometimes during the object's existence?
...
I need to store the memory address of an Object as an NSString. Is there a special format specifier for that?
...
For an iPhone app I was using window.scrollBy to scroll to the bottom of a page. The page is rendered in a UIWebView. This all worked fine untill sdk 3.0. It is documented that scrollBy is not supported in UIWebView anymore. Is there an handy javascript replacement for window.scrollBy?
...
I have an issue with my AVAudioPlayer in which if it is paused, I cannot get it to play again. Calling [audioPlayer play] after it is paused returns NO rather than the usual YES.
Any idea what could have caused this?
Someone else has this same issue as well:
http://www.iphonedevforums.com/forum/sdk-coding-help/750-avaudioplayer-doesnt...
Hi,
I've got a view of size 320x480 and in it an UIScrollView that takes all the place in my view.
The scroll view can scroll only in horizontal direction and I want to implement my own method for handling vertical swipes.
UIScrollView seems not to respond to touchesBegan and to touchesMoved.
What is the solution to my problem?
How ...
I've subclassed UIActionSheet, and in the -init method, I have to add the buttons individually after calling the super init (can't pass a var_args).
Right now, it looks like this:
if (self = [super initWithTitle:title delegate:self cancelButtonTitle:cancel destructiveButtonTile:destroy otherButtonTitles:firstButton,nil]) {
if (firstB...
Hi,
I need to save my own created class to file, I found on the internet, that good approach is to use NSKeyedArchiver and NSKeyedUnarchiver
My class definition looks like this:
@interface Game : NSObject <NSCoding> {
NSMutableString *strCompleteWord;
NSMutableString *strWordToGuess;
NSMutableArray *arGuessedLetters; /...
I just want to know what that is so that I can match with the font I'm gonna use on the view.
Thanks
...
I have the following code to set up and switch to the ABPeoplePickerNavigationController.
ABPeoplePickerNavigationController *peoplePicker = [
[ABPeoplePickerNavigationController alloc] init
];
peoplePicker.peoplePickerDelegate = self;
window = [[[currentView superview] superview] superview];
[window addSubview:[peoplePicker v...
I assign an object to an NSValue like this:
[NSValue valueWithNonretainedObject:myObject];
What happens if that object gets deallocated from memory, and then I try to pull it out from that NSValue? Would the reference be nil? How could I check if the object is still there? Or would the app just crash when something like this happens?
...
What are the recommended steps to be done for migrating Core Data DB changes for updated iPhone apps already shipped?
Is there any prior step one need (should) have done before shipping a Core Data app?
...
I installed the iPhone Simulator 3.0. I am not using it for iPhone app development, but rather for web development.
I want to pull up some of my web apps in Mobile Safari and take video screencasts in order to demo them to those without iPhones.
Some of these web apps use the Maps and YouTube apps, which are standard on the iPhone, but...
Heading
My application requires following things to be added in action sheet.
=>A UIToolbar
=>A Button on UIToolbar
=>A UIPicker Control
i have given below an image to understand my requirements.
Will you plz explain, How this can be implemented?
...
Has anyone else run into this problem? Here's the code:
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(WWMapAnnotation *)annotation {
// Only return an Annotation view for the placemarks. Ignore for the current location--the iPhone SDK will place a blue ball there.
NSLog(@"Request for annotation view");
if ([...
I've got a nice table populated with data, with custom-designed cell layouts. Currently, tapping a cell will push in a new view (for more information, say), which works fine.
What I'd like to do, though, is have the new view push into the cell's bounds, not fill up the whole screen. Can't seem to wrap my brain around how to accomplish t...
OS X 10.5.7 (genuine Mac)
Xcode 3.1.3
iPhone SDK 3.0
When I try to execute my iPhone application in simulator, I get the dreaded error message:
Failed to launch simulated application: Unknown error.
My application has two targets, but this error occurs on both of them.
When error occurs, the simulatoed OS hangs it displays blac...
Hi,
I'm running a small team of iPhone developers and am a bit concerned about the application transfers into iPhone from Xcode.
The problem is that whenever an app is transfered into the iphone the earlier transfered app is mysteriously replaced.
My question is, "How do I ensure that every app takes its own respective place and does ...