objective-c

How to make MPMovieController volume to mute in iphone sdk?

Hi guy's I need a help that I want to mute my movieplayer volume to mute forever.Is there any property to do this.Can u guys suggest me with some sample code to do this. Anyone's help will be much appreciated. Thank you, Madan Mohan. ...

problem with NSManagedObject in an if...

I'm new to objective-c, and I'm trying to make an application that categorizes objects... I want to make an "all" category but I run into a problem when creating this in my viewDidLoad. NSManagedObjectContext *context = [fetchedResultsController managedObjectContext]; NSEntityDescription *entity = [[fetchedResultsController fetchReques...

Getting error when added NSNumber to an array

When my program gets to the line: [userNumSequence addObject:[NSNumber numberWithInteger: sequenceNumber]]; it gets the error: Program received signal: “EXC_BAD_ACCESS”. All I'm wanting to do is to store an integer in the array. // JBNumberGeneration.m #import "JBNumberGeneration.h" @implementation JBNumberGeneration - (id) init...

adding photo on facebook wall.

- (void)postToWall { FBStreamDialog* dialog = [[[FBStreamDialog alloc] init] autorelease]; dialog.userMessagePrompt = [NSString stringWithFormat: subjectTitle]; //subjectTitle works here but not as name where i need it. NSString *src = @"http://www.sample.com/image.png"; NSString *name = storyLink; //<---------------------------------...

Anything like layout manager in Java for iOS?

Guys, I am a newbee for iOS. I need to create dynamic layout since the GUI will be generated according to the data. I checked the UIView references, it seems the standard way to add subview is like: CGRect rect = CGRectMake(0, 0, width, height); UILabel *label = [[UILabel alloc] initWithFrame: rect]; [someView addSubView: label]; But...

UITableView scrolling problem

Hi all, I have a UITableView which reloads every 3 seconds. I reload it only if my Boolean variable is true. In some conditions that variable is always true and that time table is difficult to scroll. (performance is not very good). Other times its ok. What should I do? Note: I have coded my table according to apple's recommended way(U...

Getting the album artwork, song name, album name and artist name from an audio file.

How can I get album artwork, song name, album name and artist name from an audio file? I need to display this without the use of iTunes. Thanks. ...

objective c, NSMutableArray: indexOfObject

int k = 0; k = [myArray indexOfObject:_endNode]; I only have a few objects added to the array and _endNode isn't one of them. I expect my k value to be -1. But, my k on the second line gives me a value of 21787887. ...

how to check if CLLocationCoordinate2DIsValid is available?

i'd like to use the CLLocationCoordinate2DIsValid - check, which is available in iOS 4.0 and later. how can i prevent this from being called on a iOS 3 device (it wil crash...)? i tried with: if (CLLocationCoordinate2DIsValid != NULL) { //use the check } else { //do a own check } why do iOS3 devices try to "use the check" instea...

Does NSXMLParser eat blank values?

I have some XML which looks like this: <?xml version='1.0'?> <methodResponse> <params> <param> <value><array><data> <value><array><data> <value><dateTime.iso8601>20100508T14:49:56</dateTime.iso8601></value> <value><string></string></value> ...

How to pass arguments to a cocoa-touch app

I noticed in main.m it appears to recognize parameters like any c program. How can I pass arguments to the app? ...

UITableview not reloading after UIAlertview

Hi after entering with a new item, in the delegate method from UIAlertview, I calling reloadData from Tableview and it is not being updated: - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { ...

How does a subview frame change if I transform the view frame?

I have to do this: 1:CGRect originalSubviewFrame = subview.frame; 2:view.frame = (CGRect)newFrame; 3:subview.frame = originalSubviewFrame; I think instructions 1 and 3 shouldn't be there but if I don't restore the subview shape, it change for some reason!?!? I read the documentation but it's unclear. ...

myView.frame Vs. self.myView.frame

I know it's often advisable to use the @property accessors, and I know it's important to use self.myView = x instead of mView = x, but: Isn't myView.frame sufficient? The AtomicElementFlippedView.m file in TheElements has self.wikipediaButton.frame=buttonFrame;. Shouldn't I leave out self if I'm getting/setting a property of my ivar an...

iostream and sstream for Objective-C

I'm trying to port some C++ code to Objective-C. It includes iostream and sstream, but Objective-C does not recognize these. What should be done? ...

UISplitViewController with three controller

Hi Friends, I am working with developing an iPad application. In that i have to display two table views and one web view in a single view. UISplitViewController allows to add two controller only. Please any one help me. ...

adding images to UIScrollView

Hi, There are 20 images. When scrolling the UIScrollView, I want to add the image to UIScrollView (one by one). How to do this ? Please help me to do this. ...

Matching an NSString with part of a text paragraph on a website. - iPhone SDK

Hello, So basically I'm working on an application, and one of the features is an anti-cracking feature. It checks the webpage for the UDID number of the device, and if it is there, it allows the application to run, if it's not there, it runs exit(0);. So far, this is what I have. This is in my AppDelegate.m - (BOOL)application:(UIAppli...

NSString to camel case

Hi all, I am trying to figure out how to take a given NSString and convert it to camel case. I have seen lots of code samples out there for going back and forth between underscores_ and camel-case, but I am dealing with strings that are capitalized. So if I had the string: 12345 SAMPLE STREET #12 or 789 N HASKELL STREET, how would I ...

Objective-C appropriate use of autorelease?

I'm learning Objective-C and I'm trying to write a Vector3D class. In C++ or Java the function I want to implement would look something like this: Vector3D { Vector3D crossProduct(Vector3D in) { Vector3D result; result = ... // maths involving this classes variables and the input Vectors variables. return result; } ...