I have a view (UIScrollView), which loads some data, and displays various things from it in various subviews. So I have approx 10 subviews (UIImageView, UILabel) and I need to place them programatically considering their unpredictable contents (i.e. different height/width for the UILabels depending on the text property).
From what I've ...
We have a game that is very close to being released, but we have one extremely annoying problem. One on of our Beta testers phones, he can't hear any of the in game sound effects. He can, however, hear the background music and the title screen music just fine.
The background and title music are both being played via AVAudioPlayer (t...
I am looking for UITextFieldDelegate sample code. Please teach when knowing.
...
NSMutableURLRequest apparently changes case on header fields.
For example, setting:
[request addValue:myValue forHTTPHeaderField:@"FOOBAR"];
will change the header field to "Foobar".
Anybody know a way around this? I am working with a service that requires a case sensitive field to be passed.
Also, NSMutableURLRequest shouldn't rea...
Hi everyone,
I'm trying to look through a NSMutableDictionary loaded with an NSMutableArray and I'm messing it up, and I don't know how. I'm trying to load a larger plist of game questions, then delete them if they aren't the right level. I don't get an error until I try and delete. Can anyone see the flaw in this code? I'd super ap...
Hi all,
I have a very basic doubt regarding the method that gets executed when app becomes active. So this is the sequence
1.User executes an application for sometime
2.User presses the home button and goes to use someother app for sometime
3.User presses the home button and resumes using my app again.
My question is which metho...
Hi i want to know the difference between drain, release,dealloc and retain in Objective-C.
...
Hi,
I'm pretty new to iPhone development and have been trying to work out how to include GPS information into an app I'm working on.
I've gone through the HelloThere tutorial, which is a great start
http://www.mobileorchard.com/hello-there-a-corelocation-tutorial/
And had no problems getting this to run on my iPhone. I then took t...
I'm currently trying to fix the performance of my UITableView. Basically all it is is a custom UITableViewCell with a UIImageView.
At the moment, this image is loaded in the tableView:willDisplayCell: method, however the performance is pretty bad so I decided to try and load the image asynchronously using an NSThread, but this results ...
I am creating an application. I am running a countdown timer and saving time into a database by converting time into a floating point value (double). Suppose I start the timer at 2.00 PM and set the countdown for 3 hours. After 1 hour I quit the application and on relaunch I am getting time stored from database. Count the difference betw...
Could anyone help me solve this problem please?
I have a option called favorite, each time I choose my favorite song, the song will be added into inside that favorite option. So I made a table for it, and each cell will store each song the i choose. I can remove the song as well. But before I choose any song, inside that table I want it...
I am using the NSManagedObjectContextObjectsDidChangeNotification notfication in my app, I already now how to use it. As I have used the below code to add the observer …
- (void) awakeFromNib {
NSNotificationCenter *nc;
nc = [NSNotificationCenter defaultCenter];
[nc addObserver:self
selector:@selector(syncKVO:)
name:N...
Before working with Objective-C and Core Data, I had occasions to create classes that needed to be initialized with certain parameters that, after initialization, could not be modified (though they could be read).
With Core Data, I believe I can create a customized init on my NSManagedObject derived class as long as it includes a way to...
Hello,
iSTat shows a list of running tasks and also shows the Mac address of the Wifi connection. I understand that there's a way to get the Mac address via NSHost but it seems to be a private API. Also the task list is a mystery to me. Where do they get all that information from?
Thanks!
...
I'm having trouble popping a UIViewController off of a UINavigation controller even though the reference to the nav seems to be correct and a count on viewControllers shows the right number.
I have a UINavController that gets it's first UIViewController set and then the nav controller is presented in a modal view:
workoutNavController....
Hi everyone
I am wondering, I have an empty table and I want to display a text in that table, then I want to clear that text when the table has been inserted with something else. And the text will appear again when I completely remove everything in the table again.?
...
Is this the correct (or even a valid way) to use emums in Objective-C? i.e. The menuItem is not used but just defines a list add=1, load=2, list=3 etc.
enum menuItems {add = 1,save,load,list,removeAll,remove,quit};
int optionSelect;
scanf("%d", &optionSelect);
switch (optionSelect) {
case add:
...
break;
cheers gary
...
Well, I have a UITextField.
Inside it is a property UITextField.text.
Is it ok to do:
// Assume we have UITextField * tf somewhere..
// now set its text..
tf.text = [ [ NSString alloc ] initWithUTF8String:"Init'd with utf8" ] ;
My problem with this is memory. What happens to the old value of the UITextField's text property.
Don't ...
I have a query that returns a string, as well as an escape character sequence. (ex. "USA\"")
I am using stringByReplacingOccurrencesOfString in this fashion:
[theCountry stringByReplacingOccurrencesOfString:@"\"" withString:@""];
But it is still leaving behind a set of quotes. and if I were to try the method again to remove them:
[...
Is it possible to loop through enum values in Objective-C?
...