objective-c

Are C++ initializers called in Objective-C synthesized properties?

Are C++ initializers called in Objective-C synthesized properties? Meaning if I write a custom initializer for creation from another object of the same type (C++) does the synthesized property setter call that initializer? ...

How do I resize a large image on an iPhone 3G without crashing my app?

I am working on an app that downloads images from a web site for display on iOS devices. The app runs fine on an iPad, but when run on an iPhone 3G (the only other physical device at my disposal for testing), it crashes when loading large images. As suggested elsewhere, it seems that 1024 x 1024 is about the largest size image it can con...

How does one know when it's safe to use a parent method in NS subclasses?

As an example, when I'm using an NSMutableDictionary, I know it inherits all the methods of NSDictionary, but how can I know/trust that it has overridden the behavior of those methods if I want to use NSDictionary methods (such as +dictionaryWithObjectsAndKeys) to create my mutable dictionary instance? More generally, is it the Framewo...

How to pass a integer using performSelectorInBackground

I don't want to passAnInt with object. Can I pass it with Int only? if not , how can I do so? Thank you. [myController performSelectorInBackground:@selector(passAnInt:) withObject:int]; ...

Objective C - Single Background Thread

I want to run a single background thread for an iPhone application which is available in background all the time and gets executed when specific event fires and go to wait for specific event to fire to start its execution again. During the execution of thread if specific event is fired again then thread should restart its work. I am wo...

Hmm, getting : may not respond to '-presentModalViewController:animated:'

Hello, I`m getting this annoying warning : warning: 'AppDelegate' may not respond to '-presentModalViewController:animated:' In this implementation file : - (IBAction)showInfo:(id)sender { FlipsideViewController *controller = [[FlipsideViewController alloc] initWithNibName:@"FlipsideView" bundle:nil]; controller.delegate...

Select tabbarItem in TabbarController without reloading corresponding viewcontroller?

Hi, In my coding, i have four tabbarItem, when i click each, it works fine. In the fourth i have tableviewController, when i select a row, it leads to second tabbarItem viewontroller, it also working fine. For highlighting the second i tried to use setSelectedIndex, again the second page will load, how to avoid loading the page when sel...

UIDeviceFamily only for iphone

I want to submit a application which can only run on iphone device. But when i select the UIDeviceFamily as iPhone its giving me iPhone/ iPod in the description. I am using camera in the application ? Ny suggestion on how to do it? ...

How to upload image in particular directory using CFFTP

I need to upload an image, for this i am using API's of CFFTP. But when I successfully login I am in path(/home/ftpadmim). But I want to upload image on some other path, so I need to change directory and go to root directory and then move to specified directory. But the problem is that I did not find any API of CFFTP that work same. I...

Does apple provides any API or something to access the camera, like facetime?

Hi, everyone, I want to ask a question about the apple API. Does apple provide some APIs for the developer to access the Facetime function, just like the ABPerson can access the address book. Thank you very much. ...

get image from webservice on iphone

hi frndz, will u plz tell me the method to fetch an image through webservices to iphone ...

iphone add local access

if I download a html from my web server can i use an image in my iphone app's resource folder as background? ...

JSON validation error

[[["您好世界","Hello world","N n h o sh ji "]],,"en"] this is json object: contentOfResponseDataInJsonValue I want to get 你好世界. How do it ? NSString *returnStr=[[[[contentOfResponseDataInJsonValue JSONValue] objectAtIndex:0] objectAtIndex:0] objectAtIndex:0] ; do this ,error: JSONValue failed. Error trace is: ( "Error D...

Iphone SOAP request step by step tutorial

I've been looking here for some answers to this question and have found some resources but not really found the "spot on" tutorial. So i would be grateful for any posts of tutorials on howto get SOAP working in an iphone app. I have seen that it can be done using NSURLconnection. But as I am pretty new to Objective C programming i wo...

I try to use setReturnsDistinctResults to get distinct results with Core Data but can't make it work properly

I've an Core Data entity called "Themes" with 4 properties. One of them is called "name". This property is not unique. I would like to retrieve a list of all the names contained in the data. It seems that I need to use the setReturnesDistinctResults:YES option of the fetch request but I can't make it work. Is there anything wrong in the...

CheckBox in NSTableview

I ma using NSArrayController to fill tableview. i want to set checkbox in 1 column how can I ?? ...

crash in facebook

my facebook application cashes in the following line [[FBRequest requestWithDelegate:self] call:@"facebook.fql.query" params:params]; it is saying terminating due to uncaught exception i coulndt identify why it crashes ..can anyone help me ...

Is there a thread safe way to create PNG images in pre-4.0 iOS?

I'm pretty sure that UIImagePNGRepresentation([UIImage imageWithCGImage:imageRef]) is the cause of random-looking memory leaks when done in a background thread (it causes leaks that trace back to CGContextDrawPDFPage!). Now, everywhere else on the internet says I should use CGImageDestination, which isn't available until iOS4. Is the...

Can't update the UILabel from the controller... ...

I link the xib with the source code, but when I try to update the UILabel, it can't update with no error msg. So, I make a breakpoint. When I inspect to the UILabel, which is a 0x0. I already made @synthesize in .m, but I created the IBOutlet on the .h, also I did the IBOutlet UILabel *xxxLabel; @property (retain, nonatomic) UILabel *x...

Convert the voice to text in iPhone

Hi, everyone, I want to ask a question about the iPhone application. Does Apple provide any API to the developers to record the phone call and convert it to text message? Thank you. ...