iphone

Opening With a Video In The iPhone SDK

How would I go about starting my application with a video like Gameloft does with their opening video? ...

Get size of IBOutlet UIImageView

Hello, I need to get the size of an IBOutlet UIImageView drawn in Interface Builder. But if I read the IBOutlet UIIMageView.image.size.width or .height in the viewDidLoad, viewWillAppear or viewDidAppear method I always get 0 !!! Where (which method) and how (may be an other variable ?) can I get this information ? Thank you for your...

UISlider iPhone SDK Question

Okay. In Xcode, I want my application to run a line of code once the UISlider gets to 1.00 or the end of the slider. How would I do this? ...

To Autorelease or Not to Autorelease

In the following code example from the Core Data Programming Guide, NSFetchRequest is created with autorelease while NSSortDescriptor is not created with autorelease. Why wasn't NSSortDescriptor created with autorelease? Is it a matter of preference? NSManagedObjectContext *moc = [self managedObjectContext]; NSEntityDescription *e...

iPhone - refreshing UIView with overridden drawRect and viewDidAppear

I have a written a tab-based application, which pulls data from an NSMutableArray, and graphs it in one view of a tab-based application. This works well the first time the view is viewed, but after this, the view does not refresh when it is viewed. I have overridden the viewDidLoad method in the viewController, but it does not seem to ...

Debuggin iPhone app on the phone

I've gotten stung by a bug that I just can't figure out how to debug. Basically I run my code on the simulator and everything is just fine. When I go to the actual device however, I get a EXC_BAD_ACCESS error. Unfortunately, when running on the phone under the debugger the damned thing works just fine, so I have no way to judge where th...

What is the difference between setting the delegate in Interface Builder vs using setDelegate:?

I'm trying to set the delegate for a scroll view using Interface Builder. If I have code like this: MyScrollViewDelegate * delegate = [[MyScrollViewDelegate alloc] init]; [scrollView setDelegate:delegate]; in viewDidLoad, everything works perfectly. If I open Interface Builder, add an NSObject and set the class to MyScrollViewDelega...

Why won't this program launch??

Hey all, I'm working through the Beginning iPhone Develoopment book and for some reason the project we're working on refuses to launch in the simulator, I think I've narrowed it down to something in the datePickerViewController.xib but heck if I know what is wrong, if I disconnect the uidatepicker outlet from the file's owner it works ...

How can I record the audio output of the iPhone? (like sounds of my app)

I want to record the sound of my iPhone-App. So like someone is playing something on a iPhone instrument and after that you can hear it. Is it possible without the micro? ...

Core Data and Runtime Key Value Coding

I was under the impression that with key-value coding, I could set any undefined attribute on a NSManagedObject at runtime and no exception would be thrown, but it wouldbe a way to hold objects attached to the model that are not in the data model. For example, I have a Foo object that does not have a "bar" attribute. I though that at r...

How to prevent the display of sections with no rows in UITableView?

Hey. I'm a newbie in iPhone development. I'm working on project where I have to generate sections alphabetically in tableview. I dont want to show those sections which don't have any rows. My row values are generated at runtime and are not static so at least show me a code snippet which will help me.... ...

Using Core Text for input

I'd like to make a rich text type editor using Core Text (ideally for iPad but I'm pretty sure I can't get iPad specific examples due to the NDA) I have no idea really where to start. I'd like to keep the interaction models without having to rewrite them, so would I be layering stuff on top of a text view? Then how do I keep the overlay...

How to Delete & Reorder rows in UITableView?

I'm only able to find bits and pieces, and no overall explanation and help, particularly in MonoTouch for this. I have a UITableView, I have my DataSource object, and I have my custom CellController. I have buttons on the custom cells which I want to allow the user to delete the row or move it up or down in the list presented. I just ...

/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1 error

I am getting the error Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1 every time I try to run the program on the iPhone device and the Simulator. I am also seeing this: ld: duplicate symbol .objc_class_name_MainView in /Volumes/Mark's Flash Drive/iFtB/build/iFtB.build/Debug-i...

UITableViewController and detecting touches

I have a UITableViewController and want to detect touches. Basically, I want the user to be able to hold down a touch for 3 seconds, when they let go I want to pop up a small view with a few options for the table. I've tried this... - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { self.lastTouch = [event timestamp];...

Moving a UIView containing UIButtons makes those buttons stop respond to taps

I have a UIView in a UIScrollView in a UIView in a .xib that contains several buttons. If I move that UIView down by several pixels from within viewWillAppear, the buttons all stop responding to taps. Here's the code I'm using to resize the UIScrollView and shift the buttons down: // adjust the view height to accomodate the resize...

Mac Audio framework

I know that AVFoundation framework works on iPhone. Does the same framework be used for Mac as well to play and record sounds??? Basically I want to write an application to play 2 music files parallelly and record the music that is being played. Is it possible??? ...

How to implement initWithObjects?

How can I create a class with the initializer initWithObjects? Or does it just make more sense to inherit from NSArray and work around it that way? ...

How to create kiosk-mode iPhone app?

Hi, I'd like to run an app in the KIOSK mode, so that it auto-starts after starting the device re-starts after app crash/power loss/etc. Any ideas how to do this on a [probably jailbroken?] iPhone? ...

the old display shifts-down-after-modal-view-controller issue

I've checked the other answers but have not found anything that really describes my situation. So here goes. I have a window-based app that creates and loads a UIViewController from xib. It has status bar disabled, height of 480 and a UISegmentedControl with y origin of 451. It displays nicely at the bottom of the screen.* In viewDidLo...