objective-c

UIView Animation won't run transition

So, I've searched quite a bit for this and can't seem to find a solution. This code works: CGContextRef context = UIGraphicsGetCurrentContext(); [UIView beginAnimations:nil context:context]; [UIView setAnimationDuration:5]; [c setCenter:CGPointMake(200, 200)]; [UIView commitAnimations]; This code doesn't: CGContextRef context = UIGr...

Objective-C initial values of created C-array

I create an array, similar to classic C (not NSArray or one of it's children) - something like BOOL i[5];. And I want to make all its values to be equal to NO. First of all, I didn't found any information about initial values of such arrays (I know that in classic C they will be undefined, but don't know exactly about Objective-C. I fou...

Objective c TCP/IP client

Hi all, I have a TCP server running on a machine. (implemented in Java). I need to connect to that server from a iPhone and send data to the server and also, receive data on the iphone when server pushes me data. So I need to be notified when data pushes from the server. Is there a way to do this in Objective C(socket programming). Alt...

Passing a pointer to a function in objective-c

Hi, i've a stupid questiona about passing pointer. I've this: @interface MyClass : NSObject myobj* foo; -(void)doSomething:(myobj*)aObj; @end @implementation MyClass -(void)doSomething:(myobj*)aObj { cFuncCall(&aObj); //alloc memory and init the object } -(id)init { //init stuff... [self doSomething:foo]; // foo retun 0x0!!! } ...

UIPickerView row image selection highlight colour

Hi, I currently have a UIPicker which I load in an image for each row using: - (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view Unlike the normal behaviour using text in the UIPicker row, when using images I get a background selection colour over th...

Twitter oauth problem with frindship/create in api

Hi, I am using Google Data API sample touch application, which is available at code.google.... I am having a problem can any one help. Please tell me if I am doing some thing wrong. The user who has loged in has to follow some person XYZ (just using XYZ for security purpose). I am using the URL urlStr = @"http://api.twitter.com/1/f...

Iphone objective c: I have fix an issue but I am not sure why it worked

I had a data loader send a message to its delegate when its done - (void) loadingMethod { // Loading stuff... [delegate LoaderDidFinish]; } The delegate then relases the loader that called it, then does some stuff. - (void) LoaderDidFinish { [Loader release]; // Do stuff } This caused a bad acces error. I assuemed t...

Convert in CFDataRef

Hi, I have a problem. i want convert my object "Position" in a CFDataRef for sending it in the TCP Socket. I don't know how i can do. Can you help me? @interface Position : NSObject { NSString *name; float valueX; float valueY; float valueZ; } -(BOOL)setValue:(NSString*)name:(float)valueX:(float)valueY:(float)valueZ;...

Core-Plot: How to add button on CPLayerHostingView

I would like to add some buttons on CPLayerHostingView. I have tried the same by creating some an object of UIButton and adding it as subview on my CPLayerHostingView but it didn't worked as expected. Please help me to do the same. ...

Python Application in right click menu of OS X

Hi All, I know that there is the PyObjC bridge is OSX and what I want to do is to put a python application/script in the rightclick context menu of OS X. there is the OnMyCommand plugin but I dont think that supports python. I've had a look at how to do it in Carbon/ Objective-C and i'll admit it im a wuss and am just not smart enough y...

How to include a C array in -description

I'm trying to include the elements of an array in the NSString that's returned by the -description method in my class. No clue how to do this in Objective-C...in Java there's string concatenation or StringBuilder, what's the equivalent in Obj-C? TIA.. ...

Does Safari support Objective-C app?

Hi guys, I'm wondering it there is a way to build an Objective-C applications and then integrate into an HTML page so it can be open from iPhone, Safari. Is that possible? I'm thinking to be something similar with Flash application embedded on HTML pages by using a Flash Player plugin. Cheers, Codrin ...

How to convert NSDate into Unix timestamp in Objective C/iPhone?

How can I convert an NSDate to a Unix timestamp in Objective-C? ...

What is #import and @class for and why are they in both the .h and .m files?

Why do you need to use import statements in the .h and .m files What is the difference between @class Possession and #import Possession.h ...

What is the problem with my code? I'm using MBProgressHUD

Hi, I'm using MBProgress HUD and I don't know what is the problem. I have a button that shows the HUD. This is my code: - (void)showHUD:(id)sender { HUD = [[MBProgressHUD alloc] initWithView:self.view]; HUD.mode = MBProgressHUDModeCustomView; [self.view addSubview:HUD]; HUD.delegate = self; HUD.labelText = @"No Inte...

UITableView section headers are blank and flickering.

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { id <NSFetchedResultsSectionInfo> sectionInfo = [[self.fetchedResultsController sections] objectAtIndex:section]; if ([tempArray containsObject: [sectionInfo indexTitle]]) { [tempArray removeObjectAtIndex:[tempArray indexOfObject:[sectionInf...

Draw a cross at center of a UIImagePickerController.

Hello. I'm very new on iPhone development. I'm trying to draw a cross over the image obtained from camera. I'm using a custom ViewController that inherits from UIImagePickerController. When I star the application, I see the cross, but a few seconds after the cross disappears. Should I use cameraOverlayView? Thank you ...

How to get metadata from video-movie file with using Objective-c?

Any help? Now can get NSSize, duration and its all. ...

How do I store a cookie value as a String?

I am having problems storing a cookie value as a string for an iPhone project. Currently, I am retrieving the value of the cookies this way: NSString *somevalue; for (NSHTTPCookie *cookie in cookies) { NSLog(@"Name: %@ : Value: %@, Expires: %@", cookie.name, cookie.value, cookie.expiresDate); somevalue = cookie.value; } Now, ...

Objective-C object release and allocation timing

The code for this question is too long to be of any use. But I'm pretty sure my problem has to do with releasing a class. I have a helper class, ConnectionHelper.h/.m, that handles a NSURLConnection for me. Basically, I give it the URL I want and it returns the data (it happens to do a quick json parse on it too). It has a delegate w...