objective-c

How can I replicate the Swing(Needle) animation of VoiceMemo.app?

Hello all, I want to create an application in which i want to record user voice.I want to do the same naimation as voiceMemo application does on iphone when we record sound? any sample code would be appreciated. Thanks. ...

How to Post attachments to twitter using twitter API

Hi every body, Can anyone suggest me how to post attachments to twitter using twitter API, I tried this it is working but ,our attachments has not been posted like images and links .. my code is like this TwitterRequest *t=[[TwitterRequest alloc] init]; t.username=self.username.text; t.password=self.password.text; [t statuses...

NSNumber Calculations & precision?

Two quick questions if I may, is this how I should go about taking two NSNumber objects, performing a calculation and ending up with a result that is also an NSNumber? NSNumber *flux = [[NSNumber alloc] initWithDouble:100.0]; NSNumber *mass = [[NSNumber alloc] initWithDouble:3]; double intermediate = [flux doubleValue] / [mass doubleVa...

Cocoa WebView: Cannot call Specific Javascript method using `callWebScriptMethod:`

Hi! I am loading a page into a WebView. The page has this little-test Javascript: <script type="text/javascript"> function test(parametr) { $('#testspan').html(parametr); } var bdu = (function(){ return { secondtest: function(parametr) { $('#testspan').html(parametr); } } })(); </script> The problem is that I can't cal...

objective c parse domain name from url string

Hi How would I parse a domain name in objective -c? For example if my string value was "http://www.google.com" I would like to parse out the string "google" ...

Decompiling Objective-C libraries

I've just finished a library in Objective-C that I compiled as a Static Library for distribution. I'd wanted to know what chances to get this decompiled are out there. Do you know any software that can do this? If so, how could I protect me better? EDIT: My static lib is made for iPhone / ARM I created an algorithm that depending o...

Is there any way to prevent the user from deleting the installed application?

Is there any way to prevent the user from deleting the installed application? I know the system application can not be deleted. But we can delete all the installed application. But is there any API to capture the application deletion. ...

warning: assignment from distinct Objective-C type

I've looked though al the previous questions and answers on this error but I can't figure out what I'm doing wrong. Can anyone help? @synthesize myScrollView; @synthesize mathsPracticeTextArray; -(void)loadText { NSBundle *bundle = [NSBundle mainBundle]; NSString *textFilePath = [bundle pathForResource:@"mathspractice" ofType:@...

UILabel and superscript

Hi I have two strings: a variable length piece of text another string with numbers that point to a reference In my view, the first piece of text is displayed in a UILabel, I adjust the size of the label to accomodate the size of the text. This means I cannot just place another UILabel on the screen, at least not without repositioni...

Which method should use to release an object?

I found that the iphone have viewDidUnload, and dealloc. I want to release the object. Which method should I use to release the object? What's the different between them? ...

Class' property changes type without assignment

I am declaring a Skin class as a variable on my AppDelegate. I only ever assign to it there but later in the app its as if the pointer has been reused by some other code. I have various declarations but for some reason the item toolBarTint appears to be reassigned (randomly) a different Type when using the debugger at the point of usage...

How to disable assembly in XCode's debugger window?

For some reason my XCode debugger shows assembly code when debugging an iPhone app code. I'd like to see only Objective-C code, not assembly. This used to work ok but now someting has changed. How to get back to "normal" debugging? Is there a setting in XCode somewhere? /pom ...

Iphone page curl animation issue.

Hi, I am trying to do a page curl animation which works fine. My issue comes with the fact that I am only animating the subview which is an imageview and the imageview contains an image with a transparent background. When i run the animation, I can see the transparent background of the image being highlighed to black and that creates an ...

Remove & character from string objective c

Hey, How would I go about removing the "&" symbol from a string. It's making my xml parser fail. I have tried [currentParsedCharacterData setString: [currentParsedCharacterData stringByReplacingOccurrencesOfString:@"&" withString:@"and"]]; But it seems to have no effect ...

How can I create an empty array in objective C, and assign value into it one by one?

In Java, I can do that : int[] abc = new int[10]; for(int i=0; i<abc.length; i++){ abc[i] = i; } How can I implement similar thing in Objective C? I see some answer using NSMutableArray, wt's different between this and NSArray? ...

Cocoa: is it safe to assume that the destination URL for delivering on an NSFilesPromisePboardType is a file URL?

Is it safe to assume that the destination URL passed to an outlineView:namesOfPromisedFilesDroppedAtDestination:forDraggedItems: method (as specified by the NSOutlineViewDataSource protocol) is always a file URL? In the implementation of such a method I'm making use of NSDictionary's writeToURL:atomically: to write out a ".webloc" prope...

Understanding the iBookstore/iTunes coding logic

I'm still pretty new to Objective -C and iPhone development and am trying to understand an effect that is seen in the iBook Store and in iTunes. Please take a look at the Apple Announces iPad Part 3 beginning around 3:30 - you will see Steve tap a book, it enlarges as it flips around and displays information about the book, purchasing de...

UITableView page size when paging enabled

Hi guys, I'm facing with a simple but tedious problem. What I'm trying to do is make an UITableView to page like an UIScrollView but enabling paging doesn't help me so much because I can't set page size so the tableview scrolls exactly of its height so it shows rows 1...10 or 11...20 and so on. What I'd like instead is that no cell rema...

How to optimize the picker view in iPhone?

I want my picker view can display 1 - 200. but I think it is too much memory, if I assign an Array in this view: self.myLargeView = [[NSArray alloc] initWithObjects:@"1 unit", @"2 units", .... ..., @"199 units" @"200 units", nil]; //code skipped How can I reduce the memory load in application? any ideas? ...

How to download text file from web on iPhone?

Hi, I'm a young iphone dev who needs to download a .txt file from a web (I got a ftp sever) to update a small database on the device. Anyone could give me an advice of how to do this? Thanks. ...