objective-c

Audio streaming from iPhone to a server?

How can I stream the audio recorded from iPhone to a server continuously? Am I really have to use RTP? Any other suggestions? Thanks. ...

How to check the URL of a WebView?

I have a Subview that load a Webview. In this Webview I load a file HTML locally in the Documents folder of my App. I need to check if the webview load another HTML file. Specifically: 1) Webview load "index.html" locally in my Documents folder 2) After 7 days a Javascript load another page with "location.href= "index2.html" ", 3) When I...

iPhone coredata fetch request, basics around relationships and sections

Hi all, I've got what is hopefully a simple question - I've got two entities - List and ListItem - and there's a one-to-many relationship set up between them, all good. My problem comes when I'm trying to perform a fetchrequest which will return the listitems sectioned up by an attribute of the listitem. I can't perform a fetchrequest...

Vibrate iPhone while Recording

I'm trying to get my iPhone to vibrate while I'm recording. I've tried this: UInt32 category = kAudioSessionCategory_PlayAndRecord; status |= AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(category), &category); UInt32 allowMixing = true; status |= AudioSessionSetProperty ( kAudioSessionProperty_OverrideCate...

sound and Nstimer stopped when iphone is in deepsleepmode?

I am creating an application in which I'm using nstimer and avaudioplayer to play sound,but both sound and timer stops when phone is in deep sleep mode.how to solve this issue? here is the code to play audio -(void)PlayTickTickSound:(NSString*)SoundFileName { //Get the filename of the sound file: NSString *path = [NSString stringWithFo...

What is the purpose of having both NSMutableString and NSString?

Why does Objective C provide both class NSString and subclass NSMutableString rather than just provide NSMutableString? Isn't a NSString equivalent to "const NSMutableString"? In C++, you have only one string class, std::string, and if you want a constant you declare a const std:string. I'm interested in knowing why I shouldn't just u...

CoreData: Storing (and sorting by) a vector of floating point numbers

I am building an application using CoreData which will require me to store an array of floating point numbers against instances of an Entity, and then fetch a selection of these entities in order of the (say) manhattan distance between their respective matrices. Here is a rough diagram of something like what I mean: Entity: { name: '...

Problem getting path to .plist using [[NSBundle mainBundle] pathForResource

I'm an Objective C noob, and I don't know enough to explain the following problem. This code works: NSString *plistPath = @"/Users/andrewf/MyApp/Resources/Plates.plist"; dicPlates = [[NSDictionary alloc] initWithContentsOfFile:plistPath]; My dictionary object is loaded with values as expected. This code does not work: NSString *pli...

Makeing view resize to its parent when added with addSubview.

Hy i'm having problem when using addSubview. Example code: ParentView *myParentView = [[ParentView alloc] initWithNibName:@"ParentView " bundle:nil]; ChildeView *myChildeView = [[ChildeView alloc] initWithNibName:@"ChildeView" bundle:nil]; //... parent frame resized with setFrame lets say to x:0, y:0, W:320, H:411 [[myParentView view...

Is there an API for the blue email address bubbles?

Hi! Is there an API that will let me reproduce the blue round email address bubbles easily? You see these bubbles in Mail on MacOS and on the iPhone. Thanks! ...

Nesting Custom Classes/XIB's with Interface Builder

I'll try to make this as short as I can. I wrote a custom class that extends UIView with a couple of IBOutlet properties, and it has a XIB associated with it where those IBOutlets are linked to. I then want to take that class, embed it in some other XIB (for example, a table cell), and just have it work. It seems that when I embed tha...

UITableViewCell Accessory Type Checked on Tap & Set other unchecked

Hello, Every one. I am confused a little bit about settings table view cell accessories. I have fixed two sections in my table Home Office What I want is as follow.... When User tap any of the cell Cell gets selected & I want to set checked (set uitableviewcell accessory type -checked of tapped cell ) And also all other cell's...

Child Controller reuse (Navigation Controller setup in Beginning iPhone 3 Development)

My apologies for posting such a book-specific question but by question relates to a particular explanation, which some of the members here may have come across, in "Beginning iPhone 3 Development: Exploring the iPhone SDK by Dave Mark and Jeff LaMarche". I have tried the book's forum some time ago with no response. I am slightly confuse...

JSON framework w/o hidden APIs?

Given all the issues around hidden APIs and Apple now checking for them before releasing anything into the app store, how can you be sure if a particular framework is using hidden APIs? For example, I like the Google JSON framework: http://code.google.com/p/json-framework/. I have no idea if they are using hidden APIs. What else is th...

String Comparison Woes

I have an array of dictionary objects and I am trying to do a simple comparison of the contents of a record inside the dictionary objects. Here is my code - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { int timeIndex = [indexPath indexAtPosition: [indexPath length] - 1]; ...

Integer Casting in dealing with strings in Cocoa

I have what I hope to be a pretty simple problem. I'm very simply trying to convert a char to it's lowercase version. Here's my code: - (IBAction)click:(id)sender { [outputLabel setText:[inputField text]]; NSString* textFieldString = [inputField text]; NSLog(@"String is %@", textFieldString); int textFieldLength = textF...

Issue pushing new view controllers on stack using TTURLMap

have an app using tabs, those tabs are mapped as shown in TTNavigatorDemo, in each of those tabs I have varying table views. Each table item has a dynamic TTURLMap URL associated with it. When I select an item, I know the subsequent view controller is being called, i just log in the initWithNavigatorURL function. However, the view is n...

Exit Sub equivalent in Objective C?

I'm pretty much new to Objective C but I've had some experience in Visual Basic. What's the equivalent of the Exit Sub statement to stop executing code if conditions aren't met? I'm talking along the lines of If Some.Condition.Is.Not.Met Then Exit Sub //Please don't execute any more code in this method Is this the correct way t...

iPhone Core-Plot Tick Marks Not Showing

I went through the tutorial here: http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application, and I can get a graph to show, but I don't see any tick marks or labels on my axis set. Is there something simple I'm overlooking? Below is my code to create the graph, and I also implemented the delegate functions. I am s...

Using CATransition with multiple Xib files on Iphone

I've been following this tutorial(www.vimeo.com/1450817) on using Multiple XIB files and I wanted more Transition animations besides flipping and Curling. I've also came across the CATransition class and I wanted to use it but all the tutorial that I've seen with it shows how to use it only if there are views in the same XIB file. so f...