objective-c

Is self a pointer?

What kind of thing is self? Is it correct to call it a pointer? Or is it a variable? Or what else? ...

s7graphview example

Hi, I am looking for an graph library for the iPhone which allowes me to set texts as values on the X-axis. After a quick look at core-plot, it seems its uncapable to do so. I stumbled over s7graphview but can't seem to get it working. Is there anyone who did got it working, and might be able to share it with me? Or any links to some ...

help!!! when playing a sound animation pauses\slowing

i can't find no solution!!! animation size 10kb sound size 20kb here is the code: - (void)setupSounds { NSString * filePath filePath = [[NSBundle mainBundle] pathForResource:@"shake" ofType:@"mp3"]; soundShuffle = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:filePath ]error:nil]; ...

Swapping Endianness In Objective-C?

I need to swap the endianness of some values and just wondered if there was anything available in Objective-C, currently I am swapping the bytes with the CStyle function below (which obviously I can reuse) I just wanted to check there was nothing specific I was missing? float floatFlip(float inFloat) { union { int intValue; ...

Crashing while trying to move UITableView rows

I've got some rather complicated rules for moving rows around in a UITableView. There are an undefined number of sections and rows per section, and based on various rules, rows can be moved within or between sections by the user to specific other locations. All of the data updating and everything is working. But occasionally, after mo...

100% opacity UILabel over a 50% opacity background (UIView?)

So right now I have a UIView with a UILabel in it. I want the background to have an opacity < 1.0 and the label to have an opacity of 1.0. However since alphas propagate down the view hierarchy, the label ends up with an opacity < 1.0 as well. Is there anyway to do what I want without making the UILabel a subview of another view?? ...

NSKeyedUnarchiver objects getting broken?

I have an array that I'm saving to NSUserDefaults, containing an array of my custom class Assignment, which conforms to the NSCoding protocol. The array saves and loads properly, and I can verify that the retrieved first object of the array is of the class Assignment. The problem happens when I try to access ivars of the Assignment objec...

How to determine the cursor position of a UITextField?

I have a text field that is always of the format "XX0000000XX", X being a letter, 0 being a number. I switch keyboards as the user is typing depending on whether they need to enter a number or letter. This works fine, until the user positions the cursor in the middle of the text field to make an edit. How do I determine the cursor pos...

potential leak? - analyzer

analyze state leak problem, why? + (DebugOutput *) sharedDebug { @synchronized(self) { if (sharedDebugInstance == nil) { [[self alloc] init]; } } return sharedDebugInstance; } ...

How can a Hashtable access data from a text file in Objective-C??

Hi, I have already created a project to read a file and also to display it. Now i need to create a hashtable and access the data from the created file( text file ) in Objective-C for iPhone-OS. Pls do give suggestion... ...

How to add the more than one button on the right side of the navigation bar in objective.c.

I have added the one button on right side of the navigation bar with this code, but i want to add the three buttton like this but i am adding with this code, I think button is overlap on one place , i am able to see only one button on right side of navigation bar. UIButton* modalViewButton1 = [UIButton buttonWithType:UIButtonTy...

Is it possible to create a generic JSON parser ?

What I mean by generic is that you pass a class and a JSON to a method and that method transforms the JSON data in your object based on the class definition. I'm interested both in conceptual answers and Objective-C approaches. ...

My protocol method is not triggered, and no errors while trying...

Hello, First time working with protocols and it is not working but no errors either... I have defined and implemented a protocoll in a delegate (BlockPopViewController). Then I try to access it from a UIViewController (BoardViewController) whose view has been added to the delegate as a subview. The result is that my request to the pro...

Resize and move a UIView with Core Animation (CAKeyFrameAnimation)

Is this possible? I can change the opacity and position (center) of the layer but whenever I try to change the size or origin, it doesn't work. CAAnimationGroup* anigroup = [CAAnimationGroup new]; CGMutablePathRef thePath = CGPathCreateMutable(); CGPathAddRect(thePath, NULL, CGRectMake(0,0, 320, 480)); CGPathAddRect(the...

Synchronous Distributed Objects Over NSConnection Issue

I have an application that pulls data from the web, parses them, and compiles the results in a search interface. Since the data are not co-dependant, it made sense to multi-thread the application to execute multiple fetches and parses simultaneously. I use NSInvocationOperation on a search and parse object I have written to execute thi...

want to go to next view from rightbarbutton item.

I am using this code to get the three button on the right side of the navigationbar ,button are visible but next to this I want to go to the next view from this three button image, text ,vedio. NSArray *segmentTextContent = [NSArray arrayWithObjects:@"Image",@"Text",@"Video",nil]; UISegmentedControl *segmentedControl = [[UISegmen...

UIWebView and scroller indicators

Sorry for my english, I'm not a native speaker. I have a problem with scroller indeicator. When I load a simle web form into UIWebView, the scroller indicator appear on the right side of the screen. It's right, but when I try to edit some field on the form, scroller indicator move at center of the WebView, as you can see on the picture....

How to write a C++ handling class for Objective C

// -------------------------------------------------------------------- UPDATE: I messed up. I left a call directly to openfeint in my AppDelegate->onApplicationWillResignActive which was causing the compiler C++ error. My Appologies, the singleton does work should anyone be thinking of trying the same thing. Just be sure to include t...

Iphone: label text udates value but does not show in view

Hi.. Im working on a part of code where a label text should change value after getting a new value from a singleton class. Seems simple enough, and after testing the value it actually changes aswell, but its not updated in the view. In the view it stays the same as before. Ive tried the code both in -(void)viewDidLoad and -(void)viewWi...

Handwired NSTextView clipping bug

I'm trying to assemble a NSTextView by hand as in Apple's TextSizingExample and found a boring bug. If you run TextSizingExample and select "Wrapping Scrolling Text" mode, then you'll see the text being partially hidden by a vertical scrollbar. Tried to play with the size and autoresizing mask of text container and text view but it didn'...