objective-c

how to uload photo/image to facebook via iphone application

Hey all. i am integrating facebook with my iphone application. i can share text message in facebook, but i want to share/ upload photos to facebook through my iphone application. please let me know is there soution for this. i am trying the facebook sample code but it is giving me some errors: i searched out that error but other develop...

How to immediately force view to draw itself after closing alertview by the user ?

the situation is like this : if i dont have internet connection, i show alertview to the user. when the user press "try again", i call "dosomething". the problem is the alertview still show for seconds..after the user click "try again" i tried : [self.view setNeedsDisplay]; but, in not works, cause even in the documents..if said the ...

In-App review feature in iPhone App

I have recently seen in some Apps that review and rating (with 5 stars) can be integrated into the app. Does anyone have an idea how this is done? e.g. with a http request? More specific: Can I create a view in my App with a UITextField and a Button, so that when the user writes his review in the textfield and click send, the review sho...

UITabBarItem selection color

Is it possible to change the color of the active tab on iPhone's tab bar? By default it is blue and it is not working with my app's color scheme. ...

Cocoa : How do I catch drag operations initiated from an IKBrowserView?

So I've got an IKBrowserView all wired up and happily dragging my custom datatype (provided lazily via PasteboardItem) from one window to another, but now I'm interested in detecting when the user drops some data onto the trashcan. Cocoa's documentation says to check the return type of the drag operation itself, but how exactly do I do t...

How to page-scroll on a uiscrollview?

If I've got a uiscrollview which is five pages wide, what code would tell me what page I am on, when I scroll to a new page? Also, what code would scroll to a specific page? Thanks! ...

iphone programming obj-c : removing the "..."

hi, when you enter a too long sentence for the iphone it automaticaly add a "..." at the end to show you there is other stuff you don't see right. I want to delete those "...". image : ...

Can NSLocale's NSLocaleCountryCode key be directly mapped to a TLD?

Hi, in my app i need to open a website with the corresponding TLD for that country. Lets say google.com, google.de, etc... But i don't know which country codes the're specifically using in NSLocale's dict. Can i assume that the lowercase version of NSLocaleCountryCode can be appended as TLD? Regards, Erik ...

Calling function with 1 paremeter @ selector.

// Original // I want to call this guy -(void)addFavorite:(NSString *)favoriteToAdd at, @selector here action:@selector([addFavorite favoriteToAdd:@"string"])]; But I keep getting syntax error no matter which way I write it. Can someone point out the appropriate way to call this function? When it had no parameter and was "addFavo...

Removing Shine/Gloss effect on the iPhone through UIPrerenderedIcon not working on device

Hello all, I have tried to use the UIPrerenderedIcon/"Icon already includes gloss and bevel" on the Info.plist of my app and it worked perfectly on the Simulator, but not on the real device (iPod touch 2g). I have even tried to uninstall the app from the device, clean all builds but I still got the shine/gloss, that's really ruining my...

detecting double free object, release or not release ...

Hello, If we have this code in our interface .h file: @interface CarModelSelectViewController : UITableViewController { NSString *fieldNameToStoreModel; NSFetchedResultsController *fetchedResultsController; NSManagedObjectContext *managedObjectContext; DataEntered *dataEntered; } @property (nonatomic, retain) NSString *fieldNameTo...

Problem in adding data to an array in Objective-C

I am grappling with adding an NSData object to a NSMutable array. The code is executing fine but it is not adding the objects in the array.The code is as follows: NSData * imageData = UIImageJPEGRepresentation(img, 1.0); int i=0; do{ if([[tempArray objectAtIndex:i] isEqual:imageData]) { [tempArray remo...

iPhone dev - viewDidUnload subviews

I'm having a hard time undestand a couple of the methods in UIViewController, but first I'll say what I think they are meant for (ignoring interface builder because I'm not using it): -init: initialize non view-related stuff that won't need to be released in low memory situations (i.e. not objects or objects that can't be recreated ea...

How to make a file invisible in Finder using objective-c

I need to hide the file in finder as well as in spotlight if possible using objective-c or using C calls. Thanks ...

@property, ok in this situation?

I am still finding my feet with objective-c and was wondering if its acceptable to use @property on the two objects below. #import <UIKit/UIKit.h> #import <MapKit/MapKit.h> @interface MapViewController : UIViewController <MKMapViewDelegate, CLLocationManagerDelegate> { CLLocationManager *locationManager; IBOutlet MKMapView *goo...

Send http request with Chinese words

NSString *urlAddress = @"http://www.test.com/test.jsp?Query=哈囉"; NSURL *url = [NSURL URLWithString:urlAddress]; NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; NSURLResponse* myURLResponse; NSError* myError; NSData* data = [NSURLConnection sendSynchronousRequest: requestObj returningResponse:&myURLResponse error:& myErr];...

UIView animation VS core animation

I'm trying to animate a view sliding into view and bouncing once it hits the side of the screen. A basic example of the slide I'm doing is as follows: // The view is added with a rect making it off screen. [UIView beginAnimations:nil context:NULL]; [UIView setAnimationBeginsFromCurrentState:YES]; [UIView setAnimationDuration:0.07]; [UI...

Hiding keyboard with UIScrollView without glitches

I have multiple editable textfiels and some of them are covered with keyboard. So I used UIScrollView and it works quite nice. Problem is when I want to hide keyboard. If I was scrolled down, after the keyboard hides, everything jumps up as it was at beginning (without keyboard). I want to tween this part as the keyboard is hiding. So f...

extracting pdf text in objective c

up to this point, i had not found a solution that would work well to extract text from a pdf in objective c for use on the iphone. i found some standard c code and modified it to work, and thought i would provide it here, as up to this point i have used stackoverflow quite a bit but never gave back. you can get it here: http://dl.dropbox...

iPhone switch statement using enum

I have defined an enum in a header file of a class : typedef enum{ RED = 0, BLUE, Green } Colors; - (void) switchTest:(Colors)testColor; and in the implementation file I have : - (void) switchTest:(Colors)testColor{ if(testColor == RED){ NSLog(@"Red selected"); } switch(testColor){ case RED: NSLog(@"Red...