How to set NSMutableString to null?
NSMutableString *str; //I have already done the allocation etc Suppose this str has some value. I set str=@"" it shows a warning. How to set the NSMutableString as Null? ...
NSMutableString *str; //I have already done the allocation etc Suppose this str has some value. I set str=@"" it shows a warning. How to set the NSMutableString as Null? ...
So first, this question helped a lot with getting on the right track toward working core data versioning. So I added a new version for my model, and now I'm trying to get the automatic migration working, but I have a problem. I can't remember what my old version looked like! I'm trying to run the app on my phone, but I've been using the ...
Hi, Is there a method to store the state of a UISwitch with NSUserDefaults? If the state is ON I'd like to set some action... Can I do this? Thanks! ...
is the syntax for the line of code below correct? NSPredicate *predicate = [NSPredicate predicateWithFormat:@"type == %@",selectedAnimalType]; I want the 'selectedAnimalType' string to be used in a search to display the the user selected. I ran an NSLog statement for the %@ object and it returned what I wanted NSLog(@"%@",selectedAn...
hi, i've a huge problem.. I want to use both cocos2d and UIkit frameworks in one application, here is the scenario: user log in, via UIkit, then play a game written in cocos2d, and after that the actual uikit ordinary application starts. the problem is that, after starting cocos game, i'm unable to return to uikit view-based application....
I've got some code to load an image from a URL, it seems to work ok. Unless the URL contains curly brackets. This seems like it is a string formatting problem? I can't figure it out. ex @"http://site/image.png //works @"http://site/{image}.png //doesn't work NSString* mapURL = @"http://site.com/directory/{map}.png"; NSLo...
I am trying to use a URL to launch the native maps application. My build is for 3.1.3 and later. When I run the following code, safari launches with the URL instead of google maps: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://maps.google.com/maps"]]; Any suggestions? Thanks! ...
THe HIG makes a statement that on the iPad, to consider fading away controls similar to how the built in photo app does it. How is this accomplished? In my case I have an image occupying the majority of the screen with a tab bar and potentially tool bar and potentially other controls. How do I fade everything away except the image. And b...
How would it be possible to include both bold and non-bold text in a uiLabel? I'd rather not use a UIWebView.. I've also read this may be possible using NSAttributedString but I have no idea how to use that. Any ideas? Apple achieves this in several of their apps; Examples Screenshot: link text Thanks! - Dom ...
I have recently, like a few people, discovered that [ALAssetsLibrary enumerateGroupsWithTypes] likes to run its blocks on another thread. What a shame that Apple didn't document that :-) In my current circumstance I need to wait for the enumeration to complete, before the main thread returns any results. I clearly need some sort of thre...
Hi In my iPhone app, I have a number of UIImageView that do the same thing, then a second load which do the same thing. Can I some how tag/group these so that I can simply reference all the objects with one name? Otherwise it means having to have dozens of lines of code for a single repetitive action. Thanks! ...
How do I retain classes that I write? ...
my app is working on 128mb idevices when i build with Debug configuraion, but when i build in Release configuration the app crashes on startup with "BAD ACCESS". on 256mb and up it works on both configurations. according to "Activity Monitor" the "Real Memory" usage is 14mb and "Virtual Memory" is 75mb (is this normal?) "Allocations" ...
I copied the code from the ParticleDemo implementation into my project and tried to make it work. I want that when I click an image it should change/replace the scene. For some reason the scene is not getting replaced. Here is my implementation: // // HelloWorldLayer.h // FirstCocoaApplication // // Created by Mohammad Azam on 8/27/1...
Trying to work around a few corner cases for when push notifications are denied in the app and I have two questions: 1) Is there a way to reset whether the user has seen the notification request pop up? 2) Is there any way to determine if the user has said no to the notification request? ...
I'm using NSFileManager to create a file at a specified path with text view contents. I'm using following code [[NSFileManager defaultManager] createFileAtPath:saveFileName contents:[[tView text] dataUsingEncoding:NSASCIIStringEncoding] attributes:nil]; But the problem is that, its creating file with no contents. I'm sure that text co...
I'd like to add a copyright symbol in part of a UITableView footer. How do I place this symbol within a string in my application? ...
May be this is quite simple for many of the experts here. I am a newbie for iphone dev. I have a view controller showing userid and pwd text buttons. When user enters userid,pwd and click "login" button, it should go to DB on server and verify. If it is correct then another view with searchform is loaded. Can someone help me with how...
Hi I want to use tabBarController but its root view will not be the first view which the user will see on launching the application . When the user will launch the applicaion he will see the tabbar but no item selected in it i.e; the view he will see will not be the root view of the UITabbarController rather it will be some other view o...
I'm having an issue where some of my views look incorrect on App load until you rotate the device, and some where they look correct after load but incorrect after rotating. I have a window that loads with View A and after a button press, detachs View A from the window (RemoveFromSuperView) and loads View B and adds it to the window. Vi...